FlowGraphNormalizer¶
-
public final class
FlowGraphNormalizer
¶ Detects the loop nesting and dfst ordering between the Blocks of a newly built FlowGraph. Also detects dead (not connected) blocks.
Constructors¶
Methods¶
condenseFG¶
-
protected void
condenseFG
(boolean finalGraph)¶ Sweeps through the FlowGraph, using the allBlocks list, looking for mergings of BasicBlock’s, and of FGArrow’s, and removing empty Block’s and empty IF’s and Loop’s .
- Parameters
finalGraph – true to get a more aggressive condensationin the end.
findOptimalLoops¶
-
protected TapList<Block>
findOptimalLoops
()¶ Explores the nesting of loops. Makes a reasonable decision about which Block’s are in which loops, and which Block’s should become the HeaderBlock’s of these loops. Also computes the DFST order of the FlowGraph for this particular decision of loops. When this function returns, all blocks have been turned into BasicBlock’s or HeaderBlock’s according to the above decision, LoopBlock’s are created and now contain in their “inside” field the DFST list of their immediately enclosed Block’s. The output of this function is the DFST list of the top level Block’s.