diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-18 17:40:23 +0100 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-18 17:40:23 +0100 |
| commit | 8e7d41525dd6360eb828b14b2c1c764ed5023916 (patch) | |
| tree | 9c9482d8c27173064199232fa01a4f27af84114d /compiler/codeGen | |
| parent | 94291904305fb4885cbbd3b8011d1b8fa4e308b2 (diff) | |
| parent | 16cc37ff034213250c764cd941908398e4150100 (diff) | |
| download | haskell-8e7d41525dd6360eb828b14b2c1c764ed5023916.tar.gz | |
Merge remote-tracking branch 'origin/master' into tc-untouchables
Diffstat (limited to 'compiler/codeGen')
| -rw-r--r-- | compiler/codeGen/CgProf.hs | 4 | ||||
| -rw-r--r-- | compiler/codeGen/CgTicky.hs | 11 | ||||
| -rw-r--r-- | compiler/codeGen/StgCmmProf.hs | 5 | ||||
| -rw-r--r-- | compiler/codeGen/StgCmmTicky.hs | 7 |
4 files changed, 15 insertions, 12 deletions
diff --git a/compiler/codeGen/CgProf.hs b/compiler/codeGen/CgProf.hs index 6d87ee7127..1c78dd8ec6 100644 --- a/compiler/codeGen/CgProf.hs +++ b/compiler/codeGen/CgProf.hs @@ -307,8 +307,8 @@ ldvEnter cl_ptr = do (stmtC (CmmStore ldv_wd new_ldv_wd)) loadEra :: DynFlags -> CmmExpr -loadEra dflags = CmmMachOp (MO_UU_Conv cIntWidth (wordWidth dflags)) - [CmmLoad (mkLblExpr (mkCmmDataLabel rtsPackageId $ fsLit("era"))) cInt] +loadEra dflags = CmmMachOp (MO_UU_Conv (cIntWidth dflags) (wordWidth dflags)) + [CmmLoad (mkLblExpr (mkCmmDataLabel rtsPackageId $ fsLit("era"))) (cInt dflags)] ldvWord :: DynFlags -> CmmExpr -> CmmExpr -- Takes the address of a closure, and returns diff --git a/compiler/codeGen/CgTicky.hs b/compiler/codeGen/CgTicky.hs index 9e981755be..79215f6582 100644 --- a/compiler/codeGen/CgTicky.hs +++ b/compiler/codeGen/CgTicky.hs @@ -302,9 +302,9 @@ tickyAllocHeap hp (CmmLit (cmmLabelOffB ticky_ctr (oFFSET_StgEntCounter_allocs dflags))) hp, -- Bump ALLOC_HEAP_ctr - addToMemLbl cLongWidth (mkCmmDataLabel rtsPackageId $ fsLit "ALLOC_HEAP_ctr") 1, + addToMemLbl (cLongWidth dflags) (mkCmmDataLabel rtsPackageId $ fsLit "ALLOC_HEAP_ctr") 1, -- Bump ALLOC_HEAP_tot - addToMemLbl cLongWidth (mkCmmDataLabel rtsPackageId $ fsLit "ALLOC_HEAP_tot") hp] } + addToMemLbl (cLongWidth dflags) (mkCmmDataLabel rtsPackageId $ fsLit "ALLOC_HEAP_tot") hp] } -- ----------------------------------------------------------------------------- -- Ticky utils @@ -323,7 +323,8 @@ bumpTickyCounter lbl = bumpTickyCounter' (cmmLabelOffB (mkCmmDataLabel rtsPackag bumpTickyCounter' :: CmmLit -> Code -- krc: note that we're incrementing the _entry_count_ field of the ticky counter -bumpTickyCounter' lhs = stmtC (addToMemLong (CmmLit lhs) 1) +bumpTickyCounter' lhs = do dflags <- getDynFlags + stmtC (addToMemLong dflags (CmmLit lhs) 1) bumpHistogram :: FastString -> Int -> Code bumpHistogram _lbl _n @@ -346,8 +347,8 @@ bumpHistogramE lbl n -} ------------------------------------------------------------------ -addToMemLong :: CmmExpr -> Int -> CmmStmt -addToMemLong = addToMem cLongWidth +addToMemLong :: DynFlags -> CmmExpr -> Int -> CmmStmt +addToMemLong dflags = addToMem (cLongWidth dflags) ------------------------------------------------------------------ -- Showing the "type category" for ticky-ticky profiling diff --git a/compiler/codeGen/StgCmmProf.hs b/compiler/codeGen/StgCmmProf.hs index e6e9899040..d2f4984538 100644 --- a/compiler/codeGen/StgCmmProf.hs +++ b/compiler/codeGen/StgCmmProf.hs @@ -369,8 +369,9 @@ ldvEnter cl_ptr = do mkNop loadEra :: DynFlags -> CmmExpr -loadEra dflags = CmmMachOp (MO_UU_Conv cIntWidth (wordWidth dflags)) - [CmmLoad (mkLblExpr (mkCmmDataLabel rtsPackageId (fsLit "era"))) cInt] +loadEra dflags = CmmMachOp (MO_UU_Conv (cIntWidth dflags) (wordWidth dflags)) + [CmmLoad (mkLblExpr (mkCmmDataLabel rtsPackageId (fsLit "era"))) + (cInt dflags)] ldvWord :: DynFlags -> CmmExpr -> CmmExpr -- Takes the address of a closure, and returns diff --git a/compiler/codeGen/StgCmmTicky.hs b/compiler/codeGen/StgCmmTicky.hs index 137764db3d..d7517e8256 100644 --- a/compiler/codeGen/StgCmmTicky.hs +++ b/compiler/codeGen/StgCmmTicky.hs @@ -325,9 +325,9 @@ tickyAllocHeap hp (CmmLit (cmmLabelOffB ticky_ctr (oFFSET_StgEntCounter_allocs dflags))) hp, -- Bump ALLOC_HEAP_ctr - addToMemLbl cLong (mkCmmDataLabel rtsPackageId (fsLit "ALLOC_HEAP_ctr")) 1, + addToMemLbl (cLong dflags) (mkCmmDataLabel rtsPackageId (fsLit "ALLOC_HEAP_ctr")) 1, -- Bump ALLOC_HEAP_tot - addToMemLbl cLong (mkCmmDataLabel rtsPackageId (fsLit "ALLOC_HEAP_tot")) hp] } + addToMemLbl (cLong dflags) (mkCmmDataLabel rtsPackageId (fsLit "ALLOC_HEAP_tot")) hp] } -- ----------------------------------------------------------------------------- -- Ticky utils @@ -343,7 +343,8 @@ bumpTickyCounter lbl = bumpTickyCounter' (cmmLabelOffB (mkCmmDataLabel rtsPackag bumpTickyCounter' :: CmmLit -> FCode () -- krc: note that we're incrementing the _entry_count_ field of the ticky counter -bumpTickyCounter' lhs = emit (addToMem cLong (CmmLit lhs) 1) +bumpTickyCounter' lhs = do dflags <- getDynFlags + emit (addToMem (cLong dflags) (CmmLit lhs) 1) bumpHistogram :: FastString -> Int -> FCode () bumpHistogram _lbl _n |
