惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
L
LINUX DO - 热门话题
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
Cisco Talos Blog
Cisco Talos Blog
AI
AI
L
LINUX DO - 最新话题
H
Heimdal Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The GitHub Blog
The GitHub Blog
I
Intezer
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
S
Securelist
博客园_首页
IT之家
IT之家
Schneier on Security
Schneier on Security
博客园 - 叶小钗
罗磊的独立博客
WordPress大学
WordPress大学
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
W
WeLiveSecurity
The Register - Security
The Register - Security
D
DataBreaches.Net
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
Recorded Future
Recorded Future
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tailwind CSS Blog
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
T
Tor Project blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com

Chino's Studio

LLVM Backend Practices - Part 1 · Mars Studio How to support debug on GPU 一篇不知道多久前翻译的译文--30年之后,QBasic依然是最棒的编程启蒙语言 · Mars Studio REPL技术分析——Python的交互式 · Mars Studio REPL技术分析——Swift REPL模式 · Mars Studio 基于Hexo和github page搭建个人博客 · Mars Studio
Instruction Selection In LLVM · Mars Studio
Chino Mars · 2022-03-16 · via Chino's Studio

Instruction Selection In LLVM

Instruction Selection Method

  • FastISel
  • SelectionDAGISel
  • GlobalISel

related hooks, like how to specify which isel method to use

  • in TargetConfig::addCoreISelPasses will choose a valid isel method

FastISel

  • llvm ir based
  • fast
  • used in O0

workflow

llvm ir -> machine instruction with virtual register

how to impl

  1. define a class inherit from FastISel
  2. override a virtual function fastSelectInstruction, then emit each opcode in llvm ir which is target dependent

SelectionDAG based ISel

  • should lowering to DAG first from llvm ir
  • will do several times legalize and combine in instruction selecting, includes:
    • type legalize then combine
    • vector legalize then combine
    • dag legalize then combine
  • will do heuristic schdeule on DAG after selected to MachineDAG

workflow

llvm ir -> lowering to DAG -> initialize DAG -> combine -> type legalize and combine -> vector legalize and type legalize and combine -> dag legalize and combine -> insturction selection -> instruction scheduling(will introduce later)

how to impl

  1. define a class inherit from SelectionDAGISel
  2. override the entry of selection isel Select()
  3. override most of all selectXXX virtual function to select instruction, usually named as <TargetName>DAGToDAGISel()

what is lowering

lowering define some legalization info and other rules for DAG builder when SelectionDAG is initialized

GlobalISel

TODO