当前位置:网站首页>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 单向链表中:
边栏推荐
- Supervised pre training! Another exploration of text generation!
- 国产PC系统完成闭环,替代美国软硬件体系的时刻已经到来
- Drf--- quick start 01
- [mathematical logic] predicate logic (toe normal form | toe normal form conversion method | basic equivalence of predicate logic | name changing rules | predicate logic reasoning law)
- Library management system based on SSM
- The longest subarray length with a positive product of 1567 recorded by leecode
- [nlp] - brief introduction to the latest work of spark neural network
- FISCO bcos zero knowledge proof Fiat Shamir instance source code
- Asp access teaching management system design finished product
- MongoDB 慢查询语句优化分析策略
猜你喜欢
Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.
X-ray normal based contour rendering
跨境电商多商户系统怎么选
vulnhub HA: Natraj
使用BENCHMARKSQL工具对kingbasees并发测试时kill掉主进程成功后存在子线程未及时关闭
Database management tool, querious direct download
[fxcg] inflation differences will still lead to the differentiation of monetary policies in various countries
Arthas watch grabs a field / attribute of the input parameter
Five elements of user experience
[Thesis Writing] how to write the overall design of JSP tourism network
随机推荐
Square root of X
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
Why should programmers learn microservice architecture if they want to enter a large factory?
Writing skills of multi plate rotation strategy -- strategy writing learning materials
类的基础语法
The longest subarray length with a positive product of 1567 recorded by leecode
Nat. Comm. | use tensor cell2cell to deconvolute cell communication with environmental awareness
Kubernetes源码分析(一)
[set theory] set identities (idempotent law | exchange law | combination law | distribution rate | De Morgan law | absorption rate | zero law | identity | exclusion law | contradiction law | complemen
Design and implementation of JSP logistics center storage information management system
Some information about the developer environment in Chengdu
What functions need to be set after the mall system is built
[set theory] inclusion exclusion principle (including examples of exclusion principle)
[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN
How to retrieve the password for opening word files
Pdf editing tool movavi pdfchef 2022 direct download
[dynamic programming] subsequence problem
拆一辆十万元的比亚迪“元”,快来看看里面的有哪些元器件。
[fxcg] market analysis today
js实现在可视区内,文字图片动画效果