当前位置:网站首页>MC Layer Target
MC Layer Target
2022-07-03 04:33:00 【Hu's Sutra Pavilion】
Target
Every type of backends stay MC Chengdu will have a corresponding Target class , position On llvm\include\llvm\MC\TargetRegistry.h file .
- Target Contains the corresponding backends Some basic information about
- Every backend There will be a single instance Target
- Target In addition to containing some basic information , Another important use : Create for MC The classes in the layer provide createXXX Interface , Therefore use MC You need to call Target in createXX Interface Create the appropriate MC Components
- For example, when disassembling, you need to call createMCDisassembler, establish MCDisassembler Disassembly .
Target member
Target Members are mainly divided into two parts : Basic information members and various callback functions
- Basic information members , for example const char *Name、const char *BackendName Wait and so on .
- Various callback functions Fn, for example MCAsmInfoCtorFn etc. ,XXXXFn With Fn Mainly createXXXX Interface to create the corresponding MC Components used in ,
XXXXFn You need to call the corresponding... At startup registerXXX Function to register ,TargetRegistry.h Various register function Provide XXXFn Registration function .
TargetRegistry.h Various creareXXXX function , Used to create MC Various components in .
FirstTarget
All registered backend Target It will eventually be connected in series in the form of a one-way linked list :

FirstTarget Register for the first Target, Look for a Target One way linked list cyclic access is required , At present due to backend Not many , Therefore, one-way linked list can meet the demand .
<Target>TargetInfo.cpp
When you add a back-end, it usually creates a corresponding <Target>TargetInfo.cpp file , Used to provide corresponding Target Class single instance and registration function
AMDGPU MC Target The registration function is located at llvm\lib\Target\AMDGPU\TargetInfo\AMDGPUTargetInfo.cpp In file :

Provide R600 and GCN Two Target Single instance registration function .
TargetRegistry::RegisterTarget
TargetRegistry::RegisterTarget Finally, the single instance Target Sign up to RegisterTarget In a one-way list :

边栏推荐
- [fxcg] market analysis today
- A outsourcing boy's mid-2022 summary
- AWS VPC
- Small program animation realizes the running lantern and animation object
- Integration of Android high-frequency interview questions (including reference answers)
- [BMZCTF-pwn] 20-secret_ file
- Why should programmers learn microservice architecture if they want to enter a large factory?
- Basic types of data in TS
- Crazy scientist
- Truncated sentences of leetcode simple questions
猜你喜欢

Some information about the developer environment in Chengdu

2022 P cylinder filling test content and P cylinder filling simulation test questions

2022 Shandong Province safety officer C certificate examination content and Shandong Province safety officer C certificate examination questions and analysis

I've been in software testing for 8 years and worked as a test leader for 3 years. I can also be a programmer if I'm not a professional

Leetcode simple question: check whether the array is sorted and rotated
![[nlp] - brief introduction to the latest work of spark neural network](/img/65/35ae0137f4030bdb2b0ab9acd85e16.png)
[nlp] - brief introduction to the latest work of spark neural network

Use the benchmarksql tool to perform a data prompt on kingbases. The jdbc driver cannot be found

Triangular rasterization

The simple problem of leetcode: dismantling bombs

Solve BP Chinese garbled code
随机推荐
P35-P41 fourth_ context
Arthas watch grabs a field / attribute of the input parameter
2.14 summary
FuncS sh file not found when using the benchmarksql tool to test kingbases
2022 registration examination for safety production management personnel of hazardous chemical production units and examination skills for safety production management personnel of hazardous chemical
After reviewing MySQL for a month, I was stunned when the interviewer of Alibaba asked me
[Thesis Writing] how to write the overall design of JSP tourism network
2022 Shandong Province safety officer C certificate examination content and Shandong Province safety officer C certificate examination questions and analysis
Web security - CSRF (token)
Truncated sentences of leetcode simple questions
[fairseq] 报错:TypeError: _broadcast_coalesced(): incompatible function arguments
220214c language learning diary
Fcpx template: sweet memory electronic photo album photo display animation beautiful memory
Internationalization and localization, dark mode and dark mode in compose
2022 chemical automation control instrument examination summary and chemical automation control instrument certificate examination
Priv app permission exception
使用BENCHMARKSQL工具对kingbaseES执行灌数据提示无法找到JDBC driver
Priv-app permission异常
Employee attendance management system based on SSM
Human resource management system based on JSP