Basic blocks
A basic block is a contiguous block of instructions with the following properties:
-
Start of basic blocks
A basic block starts at an address A
,
storing an instruction I
, if:
- address
A
is the entry point of the program
(instruction I
is the first to be executed when the program starts); or
- address
A
is the target address of a jump or branch instruction
(instruction I
is the first to be executed after the jump/branch); or
- instruction
I
is placed at the address immediately after a jump or branch instruction.
-
End of basic blocks
A basic block ends at an address A
,
storing an instruction I
, if:
- address
A
is the exit point of the program
(instruction I
is the last to be executed before the program ends); or
- instruction
I
is a jump or a branch; or
- the next instruction after
I
is the first instruction in a basic block; or
- instruction
I
is a system call or break
.