X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgUtils.hs;h=213b9ea4a046365b2e7e69b727b269d40c19768a;hb=9ca17cfcd9d1dc84bea3f19b60b9055f02ef7736;hp=13add6c0bf89adb65f3043619c45e403d9ac7ef7;hpb=c8b41f8571034a3178a28f6ecd3d37d741b09d6d;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 13add6c..213b9ea 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -53,6 +53,7 @@ module CgUtils ( #include "HsVersions.h" #include "../includes/MachRegs.h" +import BlockId import CgMonad import TyCon import DataCon @@ -333,24 +334,24 @@ emitIfThenElse cond then_part else_part ; labelC join_id } -emitRtsCall :: LitString -> [(CmmExpr,MachHint)] -> Bool -> Code +emitRtsCall :: LitString -> [CmmKinded CmmExpr] -> Bool -> Code emitRtsCall fun args safe = emitRtsCall' [] fun args Nothing safe -- The 'Nothing' says "save all global registers" -emitRtsCallWithVols :: LitString -> [(CmmExpr,MachHint)] -> [GlobalReg] -> Bool -> Code +emitRtsCallWithVols :: LitString -> [CmmKinded CmmExpr] -> [GlobalReg] -> Bool -> Code emitRtsCallWithVols fun args vols safe = emitRtsCall' [] fun args (Just vols) safe emitRtsCallWithResult :: LocalReg -> MachHint -> LitString - -> [(CmmExpr,MachHint)] -> Bool -> Code + -> [CmmKinded CmmExpr] -> Bool -> Code emitRtsCallWithResult res hint fun args safe - = emitRtsCall' [(res,hint)] fun args Nothing safe + = emitRtsCall' [CmmKinded res hint] fun args Nothing safe -- Make a call to an RTS C procedure emitRtsCall' :: CmmFormals -> LitString - -> [(CmmExpr,MachHint)] + -> [CmmKinded CmmExpr] -> Maybe [GlobalReg] -> Bool -- True <=> CmmSafe call -> Code @@ -438,7 +439,7 @@ get_Regtable_addr_from_offset rep offset = #endif --- | Returns 'True' if this global register is stored in a caller-saves +-- | Returns @True@ if this global register is stored in a caller-saves -- machine register. callerSaves :: GlobalReg -> Bool @@ -543,10 +544,8 @@ baseRegOffset CurrentNursery = oFFSET_StgRegTable_rCurrentNursery baseRegOffset HpAlloc = oFFSET_StgRegTable_rHpAlloc baseRegOffset GCEnter1 = oFFSET_stgGCEnter1 baseRegOffset GCFun = oFFSET_stgGCFun -#ifdef DEBUG baseRegOffset BaseReg = panic "baseRegOffset:BaseReg" baseRegOffset _ = panic "baseRegOffset:other" -#endif ------------------------------------------------------------------------- @@ -905,7 +904,7 @@ doSimultaneously1 vertices edges_from stmt1 = [ key2 | (key2, stmt2) <- vertices, stmt1 `mustFollow` stmt2 ] - components = stronglyConnComp edges + components = stronglyConnCompFromEdgedVertices edges -- do_components deal with one strongly-connected component -- Not cyclic, or singleton? Just do it