Skip to content

Tag Archives: 编译原理

LLVM笔记(3):LLVM的语言(下)

(本文是 http://llvm.org/releases/2.9/docs/LangRef.html 的阅读笔记,前作为《LLVM笔记(2):LLVM的语言(中)》。) Instruction Reference terminator instruction indicates which block should be executed after the current block is finished yields ‘void’ value, ret (return) ret <type> <value> ret void branch br i1 <cond>, label <iftrue>, label <iffalse> br label <dest> ; Unconditional branch switch <intty> <value>, label <defaultdest> [ <intty> <val>, label <dest> ... ] indirectbr <somety>* […]

LLVM笔记(2):LLVM的语言(中)

(本文是 http://llvm.org/releases/2.9/docs/LangRef.html 的阅读笔记,前作为《LLVM笔记(1):LLVM的语言(上)》。) Type System Type Classifications integer: i1, i2, i3, … i8, … i16, … i32, … i64 floating point: float, double, x86_fp80, fp128, ppc_fp128 first class: integer, floating point, pointer, vector, structure, array, label, metadata. primitive: label, void, integer, floating point, x86mmx, metadata. derived: array, function, pointer, structure, packed structure, vector, opaque. Array type [<# elements> x <elementtype>] Function […]