Question

what is a basic block called if it contains a branch instruction? How about a block that does not contain a branch instruction?

Thanks,

Was it helpful?

Solution

The Wikipedia definition for Basic Block says that a basic block has one entry point, and one exit point.

It also says that the target of a jump instruction is a "leader," meaning that it marks the start of another basic block. So I guess they consider a jump (conditional or unconditional) an exit point.

It follows that jumps are places where you break off new basic blocks. I suppose you call a basic block containing a branch instruction "not a basic block."

OTHER TIPS

If a basic block contains any non-linear code-path (like a branch or jump) then it is not a basic block, by definition.

Licensed under: CC-BY-SA with attribution
scroll top