-5

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

Thanks,

  • 2
    It's a basic block that contains a branch instruction, and a basic block that doesn't. What does your textbook or teacher say? – Robert Harvey Mar 26 '14 at 15:38
  • This question appears to be off-topic because it is a "name that thing" question. "Name that thing" are bad questions for the same reasons that "identify this obscure TV show, film or book by its characters or story" are bad questions: you can't Google them, they aren't practical in any way, they don't help anyone else, and allowing them opens the door for the asking of other types of marginal questions. See http://blog.stackoverflow.com/2012/02/lets-play-the-guessing-game – gnat Mar 26 '14 at 15:39

2 Answers2

2

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

Robert Harvey
  • 199,517
1

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

ratchet freak
  • 25,876