Lowered functions
A lowered function is a set of IR instructions packaged as a single unit of computation. A lowered function has a name that must be unique across all linked modules.
A lowered function has a signature describing the type and passing conventions of its inputs and outputs.
A lowered function may have a body defined as a set of one or more basic blocks, one of which is designated as the function entry. A lowered function that does not define a body is called a stub and denotes the API of a function defined in another module or the ABI of a function linked from a binary.
Lowered function signatures
TBD
Basic blocks
A basic block is a non-empty sequence of instructions. The first and last instructions of a basic block are called its entry and exit points, respectively. Control flow shall always enter at entry points and exit at exit points. The last instruction of a basic block shall be a terminator instruction.
A basic block may accept arguments.
Given two basic blocks bb1 and bb2, bb1 is successor of bb2 (or, equivalently, bb2 is predecessor of bb1) if the exit point of bb2 may cause control flow to jump to bb1.
A basic block is reachable if it is an entry point or a successor of a reachable block. All basic blocks of a function shall be reachable in legal or canonical IR.
Given two basic blocks bb1 and bb2:
bb1dominatesbb2if control flow must go throughbb1before it can reachbb2or ifbb1isbb2;bb1strictly dominatesbb2if it dominatesbb2and it is notbb2;bb1immediately dominatesbb2if it strictly dominatesbb2and does not strictly dominate any other basic block that strictly dominatesbb2.
Last updated