Stability | provisional |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Point-of-contact : jstanley
- data CFG = CFG {
- cfgGraph :: Gr BB ()
- entryId :: BBId
- exitId :: BBId
- allBBs :: [BB]
- bbById :: BBId -> BB
- asId :: BlockLabel -> BBId
- asName :: BBId -> BlockLabel
- bbPreds :: BBId -> [BBId]
- bbSuccs :: BBId -> [BBId]
- dom :: BBId -> BBId -> Bool
- idom :: BBId -> Maybe BBId
- pdom :: BBId -> BBId -> Bool
- ipdom :: BBId -> Maybe BBId
- pdoms :: [(BBId, [BBId])]
- type BB = BasicBlock' (BBId, BlockLabel)
- data BBId
- blockId :: BB -> BBId
- blockName :: BB -> BlockLabel
- buildCFG :: [BasicBlock] -> CFG
- dummyExitName :: String
Documentation
The control-flow graph for LLVM functions
CFG | |
|
type BB = BasicBlock' (BBId, BlockLabel) Source
blockName :: BB -> BlockLabel Source
buildCFG :: [BasicBlock] -> CFG Source
Builds the control-flow graph of a function. Assumes that the entry node
is the first basic block in the list. Note that when multiple exit nodes are
present in the list, they will all end up connected to a single, unique
"dummy" exit node. Note, also, that the CFG basic blocks are of type
BasicBlock' (BBId, Ident)
; that is, they are all named, which is not the
case with the input BBs. It is expected that clients use these versions of
the basic blocks rather than those that are passed in.