当前位置:网站首页>Llvm family (1) - Introduction to llvm
Llvm family (1) - Introduction to llvm
2022-06-27 11:14:00 【itas109】
LLVM series (1)- LLVM brief introduction
If you need to reprint, please indicate the source :http://blog.csdn.net/itas109
QQ Technology exchange group :129518033
List of articles
1. LLVM summary
LLVM A project is a collection of modular and reusable compiler and tool chain technologies .
LLVM It started as a research project at the University of Illinois , The goal is to provide a modern 、 be based on SSA Compilation policy for , It can support static and dynamic compilation of any programming language .
LLVM At first C/C++ To implement objects , It has been supported at present, including ActionScript、Ada、D Language 、Fortran、GLSL、Haskell、Java Bytecode 、Objective-C、Swift、Python、Ruby、Crystal、Rust、Scala as well as C# Other languages .
Official website :https://llvm.org/
Github Address :https://github.com/llvm/llvm-project/
Open source licenses :Apache 2.0 License with LLVM exceptions
2. LLVM Introduction to subprojects
2.1 LLVM Core libraries and add ons
LLVM The core library is located in llvm Directory . It is the mainstream CPU Provides libraries for optimizer and code generation , And some tools .
LLVM The core library provides C++ 、C 、Go、Ocaml and Python Such as the interface .
Polly The project uses polyhedron model to realize a set of cache local optimization, automatic parallelization and vectorization , For example, using a cache locally optimized loop .
MLIR Subprojects are a new way to build a reusable and extensible compiler infrastructure .MLIR It aims to solve the problem of software fragmentation , Improve the compilation of heterogeneous hardware , Significantly reduce the cost of building domain specific compilers , And help connect existing compilers .
2.2 Clang compiler
Clang The compiler is located at clang Catalog , It's a LLVM Native C/C++/Objective-C compiler .
clang The catalog also contains some tools , Such as clang-format( Code formatter ).
clang-tools-extra The catalog also provides some clang Tools for , Such as clang-tidy( Static code analysis ).
2.3 LLD The linker
LLD Project is a new linker . Used to link the object file created by the compiler with the runtime library , Form an executable .LLD Linker support ELF、COFF、Mach-O and WebAssembly Format .
2.4 LLDB The debugger
LLDB The debugger is based on LLVM and Clang , Support C、C++ and Objective-C Debugging of , And provide C++ 、lua and Python etc. API Interface .
2.5 Runtime library
- compiler-rt Provides a programming language independent support library . by AddressSanitizer、 ThreadSanitizer、 MemorySanitizer and DataFlowSanitizer And other dynamic testing tools provide the implementation of runtime library .
- libunwind Provides the basis for DWARF Standard stack expansion help functions . It is mainly used for C++ And so on
Regular treatment . - libcxx and libcxxabi yes C++ Implementation of standard library , Include iostreams and STL., Including yes C++11 and C++14 Full support for .
- pstl Provides a parallel version of STL Algorithm .
- libclc yes OpenCL The runtime library of .OpenCL Is the standard of heterogeneous parallel computing , Help to transfer computing tasks to
GPU On . - libc Designed to provide a complete C library .
- OpenMP The project provides support for OpenMP API Support for .OpenMP Can help multi-threaded programming .
3. LLVM framework
Source code -> front end (Fontend) -> Optimizer (Optimizer) -> Back end (Backend) -> Machine code
front end (Fontend) : Parse the source code , Error checking and building AST Abstract syntax tree ( Lexical analysis 、 Syntax analysis 、 Semantic analysis )
Optimizer (Optimizer) : Various transformations to try to improve the running time of the code
Back end (Backend) : The code maps to the target instruction set
+----------------------------+ +----------------------------+
| | | |
| | | |
C +-------> C Frontend +-----+ +----> X86 Backend +-------> X86
| | | | | |
| | | | | |
+----------------------------+ | | +----------------------------+
| |
| |
+----------------------------+ | +----------------------------+ | +----------------------------+
| | | | | | | |
| | | | | | | |
Go +-------> Go Frontend +-----------> Common Optimizer +----------> ARM Backend +-------> ARM
| | | | | | | |
| | | | | | | |
+----------------------------+ | +----------------------------+ | +----------------------------+
| |
| |
| |
+----------------------------+ | | +----------------------------+
| | | | | |
| | | | | |
Rust +-------> Rust Frontend +-----+ +----> Mips Backend +--------> Mips
| | | |
| | | |
+----------------------------+ +----------------------------+
License
License under CC BY-NC-ND 4.0: A signature - Non commercial use - No derivatives
If you need to reprint, please indicate the source :http://blog.csdn.net/itas109
QQ Technology exchange group :129518033
Reference:
- https://llvm.org/
- http://www.aosabook.org/en/llvm.html
- https://en.wikipedia.org/wiki/LLVM
边栏推荐
- Leetcode 177 The nth highest salary (June 26, 2022)
- 【TcaplusDB知识库】Tmonitor单机安装指引介绍(一)
- Matlab exercises - create 50 rows and 50 columns of all zero matrix, all 1 matrix, identity matrix, diagonal matrix, and output the 135 element of the matrix.
- [tcapulusdb knowledge base] Introduction to tmonitor background one click installation (I)
- 机器学习系统在生产中的挑战
- 【TcaplusDB知识库】TcaplusDB系统管理介绍
- C语言0长度数组的妙用
- 【TcaplusDB知识库】TcaplusDB运维单据介绍
- Naacl 2022 | TAMT: search the transportable Bert subnet through downstream task independent mask training
- Jerry added an input capture channel [chapter]
猜你喜欢

从零开始搭建物联网系统

How to deploy jupyterlab in methodot?
![[tcapulusdb knowledge base] Introduction to tcapulusdb general documents](/img/04/b1194ca3340b23a4fb2091d1b2a44d.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb general documents
![21: Chapter 3: develop pass service: 4: further improve [send SMS, interface]; (in [send SMS, interface], call Alibaba cloud SMS service and redis service; a design idea: basecontroller;)](/img/a7/ce0dc8e53569703aa02843f1fc1cf4.png)
21: Chapter 3: develop pass service: 4: further improve [send SMS, interface]; (in [send SMS, interface], call Alibaba cloud SMS service and redis service; a design idea: basecontroller;)

Oracle multi table query

.NET6接入Skywalking链路追踪完整流程

KDD 2022 | epileptic wave prediction based on hierarchical graph diffusion learning

15+ urban road element segmentation application, this segmentation model is enough!

Oracle-多表查询

Glide缓存机制
随机推荐
【TcaplusDB知识库】TcaplusDB业务数据备份介绍
21:第三章:开发通行证服务:4:进一步完善【发送短信,接口】;(在【发送短信,接口】中,调用阿里云短信服务和redis服务;一种设计思想:BaseController;)
[tcapulusdb knowledge base] tcapulusdb tmonitor module architecture introduction
How to deploy jupyterlab in methodot?
iMeta:高颜值绘图网站imageGP+视频教程合集,已被引360次(220625更新)
Build the Internet of things system from scratch
【TcaplusDB知识库】TcaplusDB系统用户组介绍
Future & CompletionService
【TcaplusDB知识库】TcaplusDB集群管理介绍
【TcaplusDB知识库】TcaplusDB单据受理-创建业务介绍
防止被00后整顿?一公司招聘要求员工不能起诉公司
NAACL 2022 | TAMT:通过下游任务无关掩码训练搜索可迁移的BERT子网络
L'utilisation de C language 0 length Array
【TcaplusDB知识库】TcaplusDB运维单据介绍
[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (I)
如何在 Methodot 中部署 JupyterLab?
The wonderful use of 0 length array in C language
21: Chapter 3: develop pass service: 4: further improve [send SMS, interface]; (in [send SMS, interface], call Alibaba cloud SMS service and redis service; a design idea: basecontroller;)
15+ urban road element segmentation application, this segmentation model is enough!
杰理之无缝循环播放【篇】