当前位置:网站首页>MC Layer Target
MC Layer Target
2022-07-03 04:28:00 【Huo的藏经阁】
Target
每种类型的backends在MC成都会有一个对应Target类,位于llvm\include\llvm\MC\TargetRegistry.h文件。
- Target包含了对应backends的一些基础信息
- 每个backend都会有一个单实例Target
- Target除了包含一些最基本信息之外,另外一个重要用途:为创建MC层中各个类提供了createXXX接口,因此使用MC之前需要调用Target中createXX接口 按照需要创建相应MC组件
- 例如反汇编时需要调用createMCDisassembler,创建MCDisassembler进行反汇编。
Target 成员
Target 成员主要分为两个部分:基本信息成员以及各种回调函数
- 基本信息成员,例如const char *Name、const char *BackendName等等之类的。
- 各种回调函数Fn,例如MCAsmInfoCtorFn 等,XXXXFn以Fn为主主要为createXXXX接口创建相应MC中组件使用,
XXXXFn 需要在启动时调用相应registerXXX函数进行注册,TargetRegistry.h文件中提供了各种register函数 提供XXXFn注册功能。
TargetRegistry.h文件中还提供了各种creareXXXX函数,用于创建MC中各种组件。
FirstTarget
所有注册的backend Target最终会以单向链表形式串联起来:

FirstTarget 为第一个注册Target,查找某个Target时需要进行单向链表循环访问,目前由于backend不是很多,因此单向链表能够满足需求。
<Target>TargetInfo.cpp
新增一个后端时一般都会创建对应<Target>TargetInfo.cpp文件,用于提供对应Target类单实例以及注册功能
AMDGPU MC Target 注册功能位于llvm\lib\Target\AMDGPU\TargetInfo\AMDGPUTargetInfo.cpp文件中:

提供R600和GCN两个Target 单实例注册功能。
TargetRegistry::RegisterTarget
TargetRegistry::RegisterTarget最终会将单实例Target 注册到RegisterTarget 单向链表中:

边栏推荐
- MySQL field userid comma separated save by userid query
- xrandr修改分辨率與刷新率
- [set theory] ordered pair (ordered pair | ordered triple | ordered n ancestor)
- [set theory] set concept and relationship (set family | set family examples | multiple sets)
- MySQL timestampdiff interval
- [no title] 2022 chlorination process examination content and free chlorination process examination questions
- arthas watch 抓取入参的某个字段/属性
- The programmer went to bed at 12 o'clock in the middle of the night, and the leader angrily scolded: go to bed so early, you are very good at keeping fit
- [fairseq] 报错:TypeError: _broadcast_coalesced(): incompatible function arguments
- Writing skills of multi plate rotation strategy -- strategy writing learning materials
猜你喜欢

When using the benchmarksql tool to preheat data for kingbasees, execute: select sys_ Prewarm ('ndx_oorder_2 ') error

X-ray normal based contour rendering
![[Thesis Writing] how to write the overall design of JSP tourism network](/img/02/841e8870c2ef871c182b9bb8252a83.jpg)
[Thesis Writing] how to write the overall design of JSP tourism network

JS realizes lazy loading of pictures

Web - Information Collection

vulnhub HA: Natraj

Which Bluetooth headset is cost-effective? Four Bluetooth headsets with high cost performance are recommended

Jincang KFS data bidirectional synchronization scenario deployment

Mila, University of Ottawa | molecular geometry pre training with Se (3) invariant denoising distance matching
![[literature reading] sparse in deep learning: practicing and growth for effective information and training in NN](/img/7e/50fa6f65b5a4f0bb60909f57daff56.png)
[literature reading] sparse in deep learning: practicing and growth for effective information and training in NN
随机推荐
Kubernetes源码分析(一)
Design and implementation of JSP logistics center storage information management system
Php+mysql registration landing page development complete code
会员积分商城系统的功能介绍
A outsourcing boy's mid-2022 summary
MySQL timestampdiff interval
Supervised pre training! Another exploration of text generation!
The programmer went to bed at 12 o'clock in the middle of the night, and the leader angrily scolded: go to bed so early, you are very good at keeping fit
Reptile exercise 02
How to choose cross-border e-commerce multi merchant system
Js/ts bottom implementation double click event
因子选股-打分模型
Human resource management system based on JSP
Data Lake three swordsmen -- comparative analysis of delta, Hudi and iceberg
Leecode swipe questions and record LCP 18 breakfast combination
P35-P41 fourth_ context
Redraw and reflow
When using the benchmarksql tool to preheat data for kingbasees, execute: select sys_ Prewarm ('ndx_oorder_2 ') error
Dive Into Deep Learning——2.1数据操作&&练习
Basic types of data in TS