From: John Criswell
The LLVM representation aims to be a light-weight and low-level +
The LLVM representation aims to be light-weight and low-level while being expressive, typed, and extensible at the same time. It aims to be a "universal IR" of sorts, by being at a low enough level that high-level ideas may be cleanly mapped to it (similar to how @@ -222,7 +222,7 @@ following instruction is syntactically okay, but not well formed:
...because the definition of %x does not dominate all of its uses. The LLVM infrastructure provides a verification pass that may be used to verify that an LLVM module is well formed. This pass is -automatically run by the parser after parsing input assembly, and by +automatically run by the parser after parsing input assembly and by the optimizer before it outputs bytecode. The violations pointed out by the verifier pass indicate bugs in transformation passes or input to the parser.
@@ -712,7 +712,7 @@ be any type with a size. [2 x [3 x [4 x uint]]]The number of elements is a constant integer value, elementtype may +
The number of elements is a constant integer value; elementtype may be any integral or floating point type.
The string 'undef' is recognized as a type-less constant that has - no specific value. Undefined values may be of any type, and be used anywhere + no specific value. Undefined values may be of any type and be used anywhere a constant is permitted.
Undefined values indicate to the compiler that the program is well defined @@ -1038,7 +1037,7 @@ file:
Constant expressions are used to allow expressions involving other constants to be used as constants. Constant expressions may be of any first class type, and may involve any LLVM operation +href="#t_firstclass">first class type and may involve any LLVM operation that does not have side effects (e.g. load and call are not supported). The following is the syntax for constant expressions:
@@ -1072,7 +1071,8 @@ following is the syntax for constant expressions:The LLVM instruction set consists of several different classifications of instructions: terminator -instructions, binary instructions, , binary instructions, +bitwise binary instructions, memory instructions, and other instructions.
@@ -1109,7 +1109,7 @@ InstructionThe 'ret' instruction is used to return control flow (and a -value) from a function, back to the caller.
+value) from a function back to the caller.There are two forms of the 'ret' instruction: one that returns a value and then causes control flow, and one that just causes control flow to occur.
@@ -1248,7 +1248,7 @@ continued at the dynamically nearest "exception" label.The optional "cconv" marker indicates which calling + The optional "cconv" marker indicates which calling convention the call should use. If none is specified, the call defaults to using C calling conventions.
The 'free' instruction returns memory back to the unused -memory heap, to be reallocated in the future.
+memory heap to be reallocated in the future.
'value' shall be a pointer value that points to a value @@ -1833,7 +1833,7 @@ appropriate type to the program. The second form of the instruction is a shorter version of the first that defaults to allocating one element.
'type' may be any sized type.
Memory is allocated, a pointer is returned. 'alloca'd +
Memory is allocated; a pointer is returned. 'alloca'd
memory is automatically released when the function returns. The 'alloca'
instruction is commonly used to represent automatic variables that must
have an address available. When the function returns (either with the
There are two arguments to the 'store' instruction: a value
to store and an address to store it into. The type of the '<pointer>'
operand must be a pointer to the type of the '<value>'
-operand. If the store is marked as volatile then the
+operand. If the store is marked as volatile, then the
optimizer is not allowed to modify the number or order of execution of
this store with other volatile load and store instructions.
For example, let's consider a C code fragment and how it gets @@ -1960,7 +1960,7 @@ compiled to LLVM:
The index types specified for the 'getelementptr' instruction depend -on the pointer type that is being index into. Pointer +on the pointer type that is being indexed into. Pointer and array types require uint, int, ulong, or long values, and structure types require uint constants.