Constructors
NcgImplncgConfig :: !NCGConfigcmmTopCodeGen :: RawCmmDecl -> NatM [NatCmmDecl statics instr]generateJumpTableForInstr :: instr -> Maybe (NatCmmDecl statics instr)getJumpDestBlockId :: jumpDest -> Maybe BlockIdcanShortcut :: instr -> Maybe jumpDestDoes this jump always jump to a single destination and is shortcutable?
We use this to determine shortcutable instructions - See Note [What is shortcutting] Note that if we return a destination here we *most* support the relevant shortcutting in shortcutStatics for jump tables and shortcutJump for the instructions itself.
shortcutStatics :: (BlockId -> Maybe jumpDest) -> statics -> staticsReplace references to blockIds with other destinations - used to update jump tables.
shortcutJump :: (BlockId -> Maybe jumpDest) -> instr -> instrChange the jump destination(s) of an instruction.
pprNatCmmDeclS :: NatCmmDecl statics instr -> SDocModule is only for printing internal labels. See Note [Internal proc labels] in CLabel.
pprNatCmmDeclH :: NatCmmDecl statics instr -> HDocmaxSpillSlots :: IntallocatableRegs :: [RealReg]ncgAllocMoreStack :: Int -> NatCmmDecl statics instr -> UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])The list of block ids records the redirected jumps to allow us to update the CFG.
ncgMakeFarBranches :: Platform -> LabelMap RawCmmStatics -> [NatBasicBlock instr] -> UniqSM [NatBasicBlock instr]extractUnwindPoints :: [instr] -> [UnwindPoint]given the instruction sequence of a block, produce a list of the block's UnwindPoints See Note [What is this unwinding business?] in GHC.Cmm.DebugBlock and Note [Unwinding information in the NCG] in this module.
invertCondBranches :: Maybe CFG -> LabelMap RawCmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]Turn the sequence of
jcc l1; jmp l2intojncc l2; <block_l1>when possible.