LLVM--
Cheat Sheet#
It is a good idea to have this cheat sheet with you, e.g., by printing it, when writing LLVM--
code.
Description |
Example(s) |
---|---|
Integer types |
|
Structure types |
|
Fixed-size array type |
|
Named types |
|
Global variables |
|
Global string variables |
|
External function declarations |
|
Function declarations |
|
Comparison operators |
|
Arith/logical operators |
|
Arith/logical computation |
|
Allocating on the stack |
|
Loading from a pointer |
|
Storing to a pointer |
|
Integer comparison |
|
Calling void functions |
|
Calling non-void functions |
|
Casting |
|
Address of pointer |
|
Pointer arithmetic |
|
Phi node |
|
Conditional branching |
|
Unconditional branching |
|
Returning a value |
|
Returning void |
|
End of block unreachable |
|