MkGraph
- type CmmAGraph = UniqSM CmmGraphOC
- emptyAGraph :: CmmAGraph
- (<*>) :: CmmAGraph -> CmmAGraph -> CmmAGraph
- catAGraphs :: [CmmAGraph] -> CmmAGraph
- outOfLine :: CmmAGraph -> CmmAGraph
- mkLabel :: BlockId -> CmmAGraph
- mkMiddle :: CmmNode O O -> CmmAGraph
- mkLast :: CmmNode O C -> CmmAGraph
- withFreshLabel :: String -> (BlockId -> CmmAGraph) -> CmmAGraph
- withUnique :: (Unique -> CmmAGraph) -> CmmAGraph
- lgraphOfAGraph :: CmmAGraph -> UniqSM CmmGraph
- labelAGraph :: BlockId -> CmmAGraph -> UniqSM CmmGraph
- stackStubExpr :: Width -> CmmExpr
- mkNop :: CmmAGraph
- mkAssign :: CmmReg -> CmmExpr -> CmmAGraph
- mkStore :: CmmExpr -> CmmExpr -> CmmAGraph
- mkCall :: CmmExpr -> (Convention, Convention) -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkCmmCall :: CmmExpr -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkSafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> Bool -> CmmAGraph
- mkUnsafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmAGraph
- mkFinalCall :: CmmExpr -> CCallConv -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkJump :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkDirectJump :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkForeignJump :: Convention -> CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkJumpGC :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkCbranch :: CmmExpr -> BlockId -> BlockId -> CmmAGraph
- mkSwitch :: CmmExpr -> [Maybe BlockId] -> CmmAGraph
- mkReturn :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkReturnSimple :: [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkComment :: FastString -> CmmAGraph
- mkCallEntry :: Convention -> [CmmFormal] -> (Int, CmmAGraph)
- mkBranch :: BlockId -> CmmAGraph
- mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> CmmAGraph
- mkCmmIfThen :: CmmExpr -> CmmAGraph -> CmmAGraph
- mkCmmWhileDo :: CmmExpr -> CmmAGraph -> CmmAGraph
- copyInOflow :: Convention -> Area -> [CmmFormal] -> (Int, CmmAGraph)
- copyInSlot :: Convention -> [CmmFormal] -> [CmmNode O O]
- copyOutOflow :: Convention -> Transfer -> Area -> [CmmActual] -> UpdFrameOffset -> (Int, CmmAGraph)
- copyOutSlot :: Convention -> [LocalReg] -> [CmmNode O O]
- data Convention
- = NativeDirectCall
- | NativeNodeCall
- | NativeReturn
- | Slow
- | GC
- | PrimOpCall
- | PrimOpReturn
- | Foreign ForeignConvention
- | Private
- data ForeignConvention = ForeignConvention CCallConv [ForeignHint] [ForeignHint]
- data ForeignTarget
- data CmmStackInfo = StackInfo {}
- data CmmTopInfo = TopInfo {}
- type CmmGraph = GenCmmGraph CmmNode
- data GenCmmGraph n = CmmGraph {}
- type Cmm = GenCmm CmmStatics CmmTopInfo CmmGraph
- type CmmTop = GenCmmTop CmmStatics CmmTopInfo CmmGraph
Documentation
catAGraphs :: [CmmAGraph] -> CmmAGraphSource
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
withUnique :: (Unique -> CmmAGraph) -> CmmAGraphSource
stackStubExpr :: Width -> CmmExprSource
mkCall :: CmmExpr -> (Convention, Convention) -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkSafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> Bool -> CmmAGraphSource
mkUnsafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmAGraphSource
mkFinalCall :: CmmExpr -> CCallConv -> [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkDirectJump :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkForeignJump :: Convention -> CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkReturnSimple :: [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkCallEntry :: Convention -> [CmmFormal] -> (Int, CmmAGraph)Source
mkCmmIfThen :: CmmExpr -> CmmAGraph -> CmmAGraphSource
mkCmmWhileDo :: CmmExpr -> CmmAGraph -> CmmAGraphSource
copyInOflow :: Convention -> Area -> [CmmFormal] -> (Int, CmmAGraph)Source
copyInSlot :: Convention -> [CmmFormal] -> [CmmNode O O]Source
copyOutOflow :: Convention -> Transfer -> Area -> [CmmActual] -> UpdFrameOffset -> (Int, CmmAGraph)Source
copyOutSlot :: Convention -> [LocalReg] -> [CmmNode O O]Source
data Convention Source
Constructors
NativeDirectCall | |
NativeNodeCall | |
NativeReturn | |
Slow | |
GC | |
PrimOpCall | |
PrimOpReturn | |
Foreign ForeignConvention | |
Private |
Instances
data ForeignConvention Source
Constructors
ForeignConvention CCallConv [ForeignHint] [ForeignHint] |
Instances
data ForeignTarget Source
Constructors
ForeignTarget CmmExpr ForeignConvention | |
PrimTarget CallishMachOp |
data CmmStackInfo Source
Instances
type CmmGraph = GenCmmGraph CmmNodeSource
data GenCmmGraph n Source
Instances
type Cmm = GenCmm CmmStatics CmmTopInfo CmmGraphSource