ghc-7.4.1.20120215: The GHC API

Safe HaskellSafe-Infered

MkGraph

Synopsis

Documentation

type CmmAGraph = UniqSM CmmGraphOCSource

outOfLine :: CmmAGraph -> CmmAGraphSource

The argument is an CmmAGraph that must have an empty entry sequence and be closed at the end. The result is a new CmmAGraph that is open at the end and goes directly from entry to exit, with the original graph sitting to the side out-of-line.

Example: mkMiddle (x = 3) * outOfLine (mkLabel L * ...stuff...) * mkMiddle (y = x) Control will flow directly from x=3 to y=x; the block starting with L is on the side.

N.B. algebraically forall g g' : g * outOfLine g' == outOfLine g' * g

lgraphOfAGraphSource

Arguments

:: CmmAGraph 
-> UniqSM CmmGraph

allocate a fresh label for the entry point

labelAGraphSource

Arguments

:: BlockId 
-> CmmAGraph 
-> UniqSM CmmGraph

use the given BlockId as the label of the entry point