Defining a Loop

Headers

Dominators

Natural Loops

Depth-First Order and Depth-First Spanning Trees

Finding Natural Loops Efficiently

8.6.1 Defining a Loop

In order to have a method for finding loops suitable for optimization ( not all are ), we need to define what a loop is.

Intuitively, cycles in flow graphs are loops, but to perform optimizations we need a second property:

    A loop must have a single entry point