|
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data BrokenBlock |
| Similar to a CmmBlock with a little extra information
to help the CPS analysis.
| | Constructors | | BrokenBlock | | | brokenBlockId :: BlockId | The block's label like a CmmBasicBlock
| | brokenBlockEntry :: BlockEntryInfo | Ways this block can be entered
| | brokenBlockStmts :: [CmmStmt] | Body like a CmmBasicBlock
(but without the last statement)
| | brokenBlockTargets :: [BlockId] | Blocks that this block could
branch to either by conditional
branches or via the last statement
| | brokenBlockExit :: FinalStmt | The final statement of the block
|
|
|
|
|
| data BlockEntryInfo |
| How a block could be entered
See Note [An example of CPS conversion]
| | Constructors | | FunctionEntry CmmInfo CLabel CmmFormals | Block is the beginning of a function, parameters are:
1. Function header info
2. The function name
3. Aguments to function
Only the formal parameters are live
| | ContinuationEntry CmmFormals C_SRT Bool | Return point of a function call, parameters are:
1. return values (argument to continuation)
2. SRT for the continuation's info table
3. True = GC block so ignore stack size
Live variables, other than
the return values, are on the stack
| | ControlEntry | Any other kind of block. Only entered due to control flow.
|
|
|
|
| data FinalStmt |
| Final statement in a BlokenBlock.
Constructors and arguments match those in Cmm,
but are restricted to branches, returns, jumps, calls and switches
| | Constructors | |
|
|
| breakBlock |
|
|
| cmmBlockFromBrokenBlock :: BrokenBlock -> CmmBasicBlock |
| Convert from a BrokenBlock back to an equivalent CmmBasicBlock
Needed by liveness analysis
|
|
| blocksToBlockEnv :: [BrokenBlock] -> BlockEnv BrokenBlock |
| Build a mapping so we can lookup a BrokenBlock by its BlockId
|
|
| adaptBlockToFormat :: [(BlockId, ContFormat)] -> Unique -> BrokenBlock -> [BrokenBlock] |
|
| selectContinuations :: [(BlockId, ContFormat)] -> [(BlockId, ContFormat)] |
|
| data ContFormat |
Instances | |
|
|
| makeContinuationEntries :: [(BlockId, ContFormat)] -> BrokenBlock -> BrokenBlock |
|
| Produced by Haddock version 2.7.2 |