LLVM语法-语义指令特性
发布时间
阅读量:
阅读量
LLVM语法语义指令特性
High Level Structure
Module Structure
LLVM 程序由Module’s组成,每个 's 是输入程序的一个翻译单元。每个模块由函数,全局变量和符号表条目组成。模块可与 LLVM 链接器组合在一起,后者合并函数(全局变量)定义,解析前向声明,合并符号表条目。这是“hello world”模块的示例:
; Declare the string constant as a global constant.
@.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
; Explicit declaration of the puts function
define i32 @puts(i8* nocapture) nounwind
The primary function is defined as follows: define the main function as a 32-bit integer named @main, which is enclosed within curly braces. Perform the conversion from a pointer of size 13 by 8 bytes
全部评论 (0)
还没有任何评论哟~
