-- Top-level of the native codegen
data NcgImpl instr jumpDest = NcgImpl {
- cmmTopCodeGen :: DynFlags -> RawCmmTop -> NatM [NatCmmTop instr],
+ cmmTopCodeGen :: RawCmmTop -> NatM [NatCmmTop instr],
generateJumpTableForInstr :: instr -> Maybe (NatCmmTop instr),
getJumpDestBlockId :: jumpDest -> Maybe BlockId,
canShortcut :: instr -> Maybe jumpDest,
}
ArchPPC_64 ->
panic "nativeCodeGen: No NCG for PPC 64"
+ ArchUnknown ->
+ panic "nativeCodeGen: No NCG for unknown arch"
nativeCodeGen' :: (Instruction instr, Outputable instr)
=> DynFlags
= {-# SCC "RegAlloc" #-}
initUs usLive
$ liftM unzip
- $ mapUs Linear.regAlloc withLiveness
+ $ mapUs (Linear.regAlloc dflags) withLiveness
dumpIfSet_dyn dflags
Opt_D_dump_asm_regalloc "Registers allocated"
genMachCode
:: DynFlags
- -> (DynFlags -> RawCmmTop -> NatM [NatCmmTop instr])
+ -> (RawCmmTop -> NatM [NatCmmTop instr])
-> RawCmmTop
-> UniqSM
( [NatCmmTop instr]
genMachCode dflags cmmTopCodeGen cmm_top
= do { initial_us <- getUs
; let initial_st = mkNatM_State initial_us 0 dflags
- (new_tops, final_st) = initNat initial_st (cmmTopCodeGen dflags cmm_top)
+ (new_tops, final_st) = initNat initial_st (cmmTopCodeGen cmm_top)
final_delta = natm_delta final_st
final_imports = natm_imports final_st
; if final_delta == 0