| Safe Haskell | Ignore |
|---|---|
| Language | Haskell2010 |
GHC.CmmToAsm.X86.CodeGen
Synopsis
- cmmTopCodeGen :: RawCmmDecl -> NatM [NatCmmDecl (Alignment, RawCmmStatics) Instr]
- generateJumpTableForInstr :: NCGConfig -> Instr -> Maybe (NatCmmDecl (Alignment, RawCmmStatics) Instr)
- extractUnwindPoints :: [Instr] -> [UnwindPoint]
- invertCondBranches :: Maybe CFG -> LabelMap a -> [NatBasicBlock Instr] -> [NatBasicBlock Instr]
- type InstrBlock = OrdList Instr
Documentation
cmmTopCodeGen :: RawCmmDecl -> NatM [NatCmmDecl (Alignment, RawCmmStatics) Instr] Source #
generateJumpTableForInstr :: NCGConfig -> Instr -> Maybe (NatCmmDecl (Alignment, RawCmmStatics) Instr) Source #
extractUnwindPoints :: [Instr] -> [UnwindPoint] Source #
Arguments
| :: Maybe CFG | CFG if present |
| -> LabelMap a | Blocks with info tables |
| -> [NatBasicBlock Instr] | List of basic blocks |
| -> [NatBasicBlock Instr] |
This works on the invariant that all jumps in the given blocks are required. Starting from there we try to make a few more jumps redundant by reordering them. We depend on the information in the CFG to do so so without a given CFG we do nothing.
type InstrBlock = OrdList Instr Source #
InstrBlocks are the insn sequences generated by the insn selectors.
They are really trees of insns to facilitate fast appending, where a
left-to-right traversal yields the insns in the correct order.