ghc-7.2.1: The GHC API

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

data GenCmmGraph n Source

Constructors

CmmGraph 

Fields

g_entry :: BlockId
 
g_graph :: Graph n C C