summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgProf.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-08-28 16:09:50 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-08-31 16:43:58 +0100
commitde3a8f7631b5276c30c90a256e8135a8ff3095e7 (patch)
tree4c90507007f4ead15548f2002a0ff5d237f95a6e /compiler/codeGen/CgProf.hs
parent8aabe8d06f7202c9a6cd1133e0b1ebc81338eed9 (diff)
downloadhaskell-de3a8f7631b5276c30c90a256e8135a8ff3095e7.tar.gz
Cleanup: add mkIntExpr and zeroExpr utils
Diffstat (limited to 'compiler/codeGen/CgProf.hs')
-rw-r--r--compiler/codeGen/CgProf.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/codeGen/CgProf.hs b/compiler/codeGen/CgProf.hs
index 2eccae7926..c5f1afa68e 100644
--- a/compiler/codeGen/CgProf.hs
+++ b/compiler/codeGen/CgProf.hs
@@ -108,7 +108,7 @@ profDynAlloc :: ClosureInfo -> CmmExpr -> Code
profDynAlloc cl_info ccs
= ifProfiling $
do dflags <- getDynFlags
- profAlloc (CmmLit (mkIntCLit (closureSize dflags cl_info))) ccs
+ profAlloc (mkIntExpr (closureSize dflags cl_info)) ccs
-- | Record the allocation of a closure (size is given by a CmmExpr)
-- The size must be in words, because the allocation counter in a CCS counts
@@ -124,7 +124,7 @@ profAlloc words ccs
(cmmOffsetB ccs oFFSET_CostCentreStack_mem_alloc)
(CmmMachOp (MO_UU_Conv wordWidth alloc_rep) $
[CmmMachOp mo_wordSub [words,
- CmmLit (mkIntCLit (profHdrSize dflags))]]))
+ mkIntExpr (profHdrSize dflags)]]))
-- subtract the "profiling overhead", which is the
-- profiling header in a closure.
where
@@ -266,7 +266,7 @@ staticLdvInit = zeroCLit
dynLdvInit :: CmmExpr
dynLdvInit = -- (era << LDV_SHIFT) | LDV_STATE_CREATE
CmmMachOp mo_wordOr [
- CmmMachOp mo_wordShl [loadEra, CmmLit (mkIntCLit lDV_SHIFT) ],
+ CmmMachOp mo_wordShl [loadEra, mkIntExpr lDV_SHIFT ],
CmmLit (mkWordCLit lDV_STATE_CREATE)
]