O'Reilly logo

Compilers: Principles and Practice by Himanshu B. Dave, Parag H. Dave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10.1 Basic Blocks

In simple English, a basic block is a sequence of statements whose first statement may have a label, the last statement is a Jump or Conditional Jump, and does not contain any other labels, Jumps or Conditional Jumps. That is, we can only enter at the beginning of a basic block and exit at the end. If you remember Structured Programming this was exactly the condition imposed on all the control constructs like SEQUENCE, IF-THEN-ELSE, WHILE-DO, FOR, REPEAT-UNTIL and SELECT-CASE, but here a lower level of control flow is being considered, in terms of Jump instructions only.

The concept of Basic Blocks is used to form what is known as Flow-graphs, wherein they appear as nodes. A flow-graph indicates which block can follow which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required