当前位置:网站首页>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 单向链表中:

边栏推荐
- Basic types of data in TS
- MySQL field userid comma separated save by userid query
- [free completion] development of course guidance platform (source code +lunwen)
- FuncS sh file not found when using the benchmarksql tool to test kingbases
- MySQL timestampdiff interval
- JS实现图片懒加载
- Daily question - ugly number
- Taking two column waterfall flow as an example, how should we build an array of each column
- Mongodb slow query optimization analysis strategy
- [set theory] inclusion exclusion principle (including examples of exclusion principle)
猜你喜欢

When using the benchmarksql tool to test the concurrency of kingbasees, there are sub threads that are not closed in time after the main process is killed successfully

GFS distributed file system (it's nice to meet it alone)

arthas watch 抓取入参的某个字段/属性

Basic MySQL operations

金仓KFS数据双向同步场景部署

Some information about the developer environment in Chengdu

使用BENCHMARKSQL工具对KingbaseES预热数据时执行:select sys_prewarm(‘NDX_OORDER_2 ‘)报错

Nat. Comm. | use tensor cell2cell to deconvolute cell communication with environmental awareness

C language series - Section 3 - functions
![[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN](/img/7e/50fa6f65b5a4f0bb60909f57daff56.png)
[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN
随机推荐
[graduation season · aggressive technology Er] Confessions of workers
Joint search set: the number of points in connected blocks (the number of points in a set)
RSRS index timing and large and small disc rotation
AWS VPC
220214c language learning diary
Php+mysql registration landing page development complete code
vulnhub HA: Natraj
Database management tool, querious direct download
2022 electrician (Advanced) examination papers and electrician (Advanced) examination skills
SSM based campus part-time platform for College Students
Basic types of data in TS
arthas watch 抓取入参的某个字段/属性
使用BENCHMARKSQL工具对KingbaseES预热数据时执行:select sys_prewarm(‘NDX_OORDER_2 ‘)报错
MySQL field userid comma separated save by userid query
[set theory] set concept and relationship (set family | set family examples | multiple sets)
Library management system based on SSM
[fxcg] market analysis today
[Thesis Writing] how to write the overall design of JSP tourism network
Smart contract security audit company selection analysis and audit report resources download - domestic article
[fxcg] inflation differences will still lead to the differentiation of monetary policies in various countries