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

边栏推荐
- 2022 tea master (intermediate) examination questions and tea master (intermediate) examination skills
- Use the benchmarksql tool to perform a data prompt on kingbases. The jdbc driver cannot be found
- Two drawing interfaces - 1 Matlab style interface
- How to choose cross-border e-commerce multi merchant system
- What's wrong with SD card data damage? How to recover SD card data damage
- 2022 registration examination for safety production management personnel of hazardous chemical production units and examination skills for safety production management personnel of hazardous chemical
- Ffmpeg mix
- FISCO bcos zero knowledge proof Fiat Shamir instance source code
- Kingbasees plug-in KDB of Jincang database_ database_ link
- C primre plus Chapter 10 question 6 inverted array
猜你喜欢

SSM based campus part-time platform for College Students

Two drawing interfaces - 1 Matlab style interface

Which Bluetooth headset is good about 400? Four Bluetooth headsets with strong noise reduction are recommended

Golang -- realize file transfer
![[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

Internationalization and localization, dark mode and dark mode in compose

Employee attendance management system based on SSM

Leetcode simple question: check whether the string is an array prefix

2022 new examination questions for the main principals of hazardous chemical business units and examination skills for the main principals of hazardous chemical business units

FFMpeg filter
随机推荐
RSRS index timing and large and small disc rotation
Bugku CTF daily question baby_ flag. txt
What are the Bluetooth headsets with good sound quality in 2022? Inventory of four high-quality Bluetooth headsets
Truncated sentences of leetcode simple questions
Web - Information Collection
Fcpx template: sweet memory electronic photo album photo display animation beautiful memory
Mongodb slow query optimization analysis strategy
Hj35 serpentine matrix
2022-02-12 (338. Bit count)
解决bp中文乱码
Php+mysql registration landing page development complete code
使用BENCHMARKSQL工具对kingbaseES执行灌数据提示无法找到JDBC driver
vulnhub HA: Natraj
RSRS指标择时及大小盘轮动
GFS分布式文件系统(光是遇见已经很美好了)
会员积分商城系统的功能介绍
[set theory] set operation (Union | intersection | disjoint | relative complement | symmetric difference | absolute complement | generalized union | generalized intersection | set operation priority)
Kubernetes source code analysis (I)
Preliminary cognition of C language pointer
Arthas watch grabs a field / attribute of the input parameter