small perf hack in emitVectoredReturnInstr: work around lack of CSE in
the NCG by assigning info_amode to a new temporary.
CtrlReturnConvention(..) )
import CgUtils ( mkStringCLit, packHalfWordsCLit, mkWordCLit,
cmmOffsetB, cmmOffsetExprW, cmmLabelOffW, cmmOffsetW,
CtrlReturnConvention(..) )
import CgUtils ( mkStringCLit, packHalfWordsCLit, mkWordCLit,
cmmOffsetB, cmmOffsetExprW, cmmLabelOffW, cmmOffsetW,
- emitDataLits, emitRODataLits, emitSwitch, cmmNegate )
+ emitDataLits, emitRODataLits, emitSwitch, cmmNegate,
+ newTemp )
import CgMonad
import CmmUtils ( mkIntCLit, zeroCLit )
import CgMonad
import CmmUtils ( mkIntCLit, zeroCLit )
-> Code
emitVectoredReturnInstr zero_indexed_tag
= do { info_amode <- getSequelAmode
-> Code
emitVectoredReturnInstr zero_indexed_tag
= do { info_amode <- getSequelAmode
- ; let target = retVec info_amode zero_indexed_tag
+ -- HACK! assign info_amode to a temp, because retVec
+ -- uses it twice and the NCG doesn't have any CSE yet.
+ ; x <- newTemp wordRep
+ ; stmtC (CmmAssign x info_amode)
+ ; let target = retVec (CmmReg x) zero_indexed_tag
; stmtC (CmmJump target []) }
; stmtC (CmmJump target []) }