summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgUtils.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-11-28 16:32:50 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-11-29 09:12:54 +0000
commitcbe2416808d2592429830b5d0c202cdee80c36d3 (patch)
tree212db87e23980f97c116d313a462ae897a47b68d /compiler/codeGen/CgUtils.hs
parent7d13e50487eb7f80be9a8b330ef65e07138b27ef (diff)
downloadhaskell-cbe2416808d2592429830b5d0c202cdee80c36d3.tar.gz
Get rid of the "safety" field of CmmCall (OldCmm)
This field was doing nothing. I think it originally appeared in a very old incarnation of the new code generator.
Diffstat (limited to 'compiler/codeGen/CgUtils.hs')
-rw-r--r--compiler/codeGen/CgUtils.hs27
1 files changed, 11 insertions, 16 deletions
diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs
index a0a5ac2554..85957e81b9 100644
--- a/compiler/codeGen/CgUtils.hs
+++ b/compiler/codeGen/CgUtils.hs
@@ -233,23 +233,22 @@ emitRtsCall
:: PackageId -- ^ package the function is in
-> FastString -- ^ name of function
-> [CmmHinted CmmExpr] -- ^ function args
- -> Bool -- ^ whether this is a safe call
-> Code -- ^ cmm code
-emitRtsCall pkg fun args safe = emitRtsCallGen [] pkg fun args Nothing safe
+emitRtsCall pkg fun args = emitRtsCallGen [] pkg fun args Nothing
-- The 'Nothing' says "save all global registers"
-emitRtsCallWithVols :: PackageId -> FastString -> [CmmHinted CmmExpr] -> [GlobalReg] -> Bool -> Code
-emitRtsCallWithVols pkg fun args vols safe
- = emitRtsCallGen [] pkg fun args (Just vols) safe
+emitRtsCallWithVols :: PackageId -> FastString -> [CmmHinted CmmExpr] -> [GlobalReg] -> Code
+emitRtsCallWithVols pkg fun args vols
+ = emitRtsCallGen [] pkg fun args (Just vols)
emitRtsCallWithResult
:: LocalReg -> ForeignHint
-> PackageId -> FastString
- -> [CmmHinted CmmExpr] -> Bool -> Code
+ -> [CmmHinted CmmExpr] -> Code
-emitRtsCallWithResult res hint pkg fun args safe
- = emitRtsCallGen [CmmHinted res hint] pkg fun args Nothing safe
+emitRtsCallWithResult res hint pkg fun args
+ = emitRtsCallGen [CmmHinted res hint] pkg fun args Nothing
-- Make a call to an RTS C procedure
emitRtsCallGen
@@ -258,14 +257,10 @@ emitRtsCallGen
-> FastString
-> [CmmHinted CmmExpr]
-> Maybe [GlobalReg]
- -> Bool -- True <=> CmmSafe call
-> Code
-emitRtsCallGen res pkg fun args vols safe = do
- safety <- if safe
- then getSRTInfo >>= (return . CmmSafe)
- else return CmmUnsafe
+emitRtsCallGen res pkg fun args vols = do
stmtsC caller_save
- stmtC (CmmCall target res args safety CmmMayReturn)
+ stmtC (CmmCall target res args CmmMayReturn)
stmtsC caller_load
where
(caller_save, caller_load) = callerSaveVolatileRegs vols
@@ -1009,13 +1004,13 @@ fixStgRegStmt stmt
CmmStore addr src -> CmmStore (fixStgRegExpr addr) (fixStgRegExpr src)
- CmmCall target regs args srt returns ->
+ CmmCall target regs args returns ->
let target' = case target of
CmmCallee e conv -> CmmCallee (fixStgRegExpr e) conv
other -> other
args' = map (\(CmmHinted arg hint) ->
(CmmHinted (fixStgRegExpr arg) hint)) args
- in CmmCall target' regs args' srt returns
+ in CmmCall target' regs args' returns
CmmCondBranch test dest -> CmmCondBranch (fixStgRegExpr test) dest