Safe Haskell | None |
---|
- type CmmAGraph = OrdList CgStmt
- data CgStmt
- (<*>) :: CmmAGraph -> CmmAGraph -> CmmAGraph
- catAGraphs :: [CmmAGraph] -> CmmAGraph
- mkLabel :: BlockId -> CmmAGraph
- mkMiddle :: CmmNode O O -> CmmAGraph
- mkLast :: CmmNode O C -> CmmAGraph
- outOfLine :: BlockId -> CmmAGraph -> CmmAGraph
- lgraphOfAGraph :: CmmAGraph -> UniqSM CmmGraph
- labelAGraph :: BlockId -> CmmAGraph -> UniqSM CmmGraph
- stackStubExpr :: Width -> CmmExpr
- mkNop :: CmmAGraph
- mkAssign :: CmmReg -> CmmExpr -> CmmAGraph
- mkStore :: CmmExpr -> CmmExpr -> CmmAGraph
- mkUnsafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmAGraph
- mkFinalCall :: CmmExpr -> CCallConv -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkCallReturnsTo :: CmmExpr -> Convention -> [CmmActual] -> BlockId -> ByteOff -> UpdFrameOffset -> (ByteOff, [(CmmExpr, ByteOff)]) -> CmmAGraph
- mkJump :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkDirectJump :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkForeignJump :: Convention -> CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
- mkForeignJumpExtra :: Convention -> CmmExpr -> [CmmActual] -> UpdFrameOffset -> (ByteOff, [(CmmExpr, ByteOff)]) -> 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
- copyInOflow :: Convention -> Area -> [CmmFormal] -> (Int, CmmAGraph)
- copyOutOflow :: Convention -> Transfer -> Area -> [CmmActual] -> UpdFrameOffset -> (ByteOff, [(CmmExpr, ByteOff)]) -> (Int, [GlobalReg], CmmAGraph)
- noExtraStack :: (ByteOff, [(CmmExpr, ByteOff)])
- toCall :: CmmExpr -> Maybe BlockId -> UpdFrameOffset -> ByteOff -> ByteOff -> [GlobalReg] -> CmmAGraph
- data Transfer
Documentation
type CmmAGraph = OrdList CgStmtSource
CmmAGraph is a chunk of code consisting of:
- ordinary statements (assignments, stores etc.) * jumps * labels * out-of-line labelled blocks
The semantics is that control falls through labels and out-of-line blocks. Everything after a jump up to the next label is by definition unreachable code, and will be discarded.
Two CmmAGraphs can be stuck together with *, with the meaning that control flows from the first to the second.
A CmmAGraph
can be turned into a CmmGraph
(closed at both ends)
by providing a label for the entry point; see labelAGraph
.
catAGraphs :: [CmmAGraph] -> CmmAGraphSource
mkLabel :: BlockId -> CmmAGraphSource
created a sequence goto id; id: as an AGraph
outOfLine :: BlockId -> CmmAGraph -> CmmAGraphSource
A labelled code block; should end in a last node
lgraphOfAGraph :: CmmAGraph -> UniqSM CmmGraphSource
allocate a fresh label for the entry point
labelAGraph :: BlockId -> CmmAGraph -> UniqSM CmmGraphSource
use the given BlockId as the label of the entry point
stackStubExpr :: Width -> CmmExprSource
mkUnsafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmAGraphSource
mkFinalCall :: CmmExpr -> CCallConv -> [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkCallReturnsTo :: CmmExpr -> Convention -> [CmmActual] -> BlockId -> ByteOff -> UpdFrameOffset -> (ByteOff, [(CmmExpr, ByteOff)]) -> CmmAGraphSource
mkDirectJump :: CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkForeignJump :: Convention -> CmmExpr -> [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkForeignJumpExtra :: Convention -> CmmExpr -> [CmmActual] -> UpdFrameOffset -> (ByteOff, [(CmmExpr, ByteOff)]) -> CmmAGraphSource
mkReturnSimple :: [CmmActual] -> UpdFrameOffset -> CmmAGraphSource
mkCallEntry :: Convention -> [CmmFormal] -> (Int, CmmAGraph)Source
copyInOflow :: Convention -> Area -> [CmmFormal] -> (Int, CmmAGraph)Source
copyOutOflow :: Convention -> Transfer -> Area -> [CmmActual] -> UpdFrameOffset -> (ByteOff, [(CmmExpr, ByteOff)]) -> (Int, [GlobalReg], CmmAGraph)Source
noExtraStack :: (ByteOff, [(CmmExpr, ByteOff)])Source