当前位置:网站首页>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 :

边栏推荐
- GFS distributed file system (it's nice to meet it alone)
- 2022 tea master (intermediate) examination questions and tea master (intermediate) examination skills
- 逆袭大学生的职业规划
- 一名外包仔的2022年中总结
- Internationalization and localization, dark mode and dark mode in compose
- 金仓数据库KingbaseES 插件kdb_database_link
- Dive Into Deep Learning——2.1数据操作&&练习
- Ffmpeg tanscoding transcoding
- Leetcode simple question: check whether two string arrays are equal
- 2022 chemical automation control instrument examination summary and chemical automation control instrument certificate examination
猜你喜欢

X-ray normal based contour rendering

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

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

Bugku CTF daily question baby_ flag. txt

vulnhub HA: Natraj

A outsourcing boy's mid-2022 summary

Why should programmers learn microservice architecture if they want to enter a large factory?

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

Games101 Lesson 9 shading 3 Notes

7. Integrated learning
随机推荐
Asp access teaching management system design finished product
RSRS指标择时及大小盘轮动
RSRS index timing and large and small disc rotation
Solve BP Chinese garbled code
Crazy scientist
AWS VPC
Php+mysql registration landing page development complete code
Wine travel Jianghu War: Ctrip is strong, meituan is strong, and Tiktok is fighting
Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.
Why should programmers learn microservice architecture if they want to enter a large factory?
跨境电商多商户系统怎么选
Factor stock selection scoring model
Reptile exercise 03
FFMpeg filter
C language series - Section 3 - functions
Dive into deep learning - 2.1 data operation & Exercise
[pat (basic level) practice] - [simple simulation] 1063 calculate the spectral radius
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
Dive Into Deep Learning——2.1数据操作&&练习
The simple problem of leetcode: dismantling bombs