inside-compiler / inside-compiler.github.io

blogs about Coimpiler & Virtual Machine
1 stars 3 forks source link

深入理解LLVM代码生成-概述 | Inside Compiler #35

Open fiking opened 6 months ago

fiking commented 6 months ago

https://inside-compiler.github.io/2024/02/02/llvm-codegen-overview/

代码生成是编译器后端的统称,在编译器的实现中占据着非常重要的地位,也是非常复杂的模块。以LLVM 15为例,整个项目代码行数超过1000万^1,其中clang相关代码超过400万行,LLVM中端优化以及后端代码生成相关代码也已经有近400万行代码。其中代码生成代码量约为200万行,包含了架构无关的代码和架构相关的代码。其中架构无关代码约为50万行,架构相关约为150万行。架构无关的代码主要包了含指