문제

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

Thanks,

도움이 되었습니까?

해결책

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."

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top