summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorGeoffrey Mainland <gmainlan@microsoft.com>2013-06-22 20:23:24 +0100
committerGeoffrey Mainland <gmainlan@microsoft.com>2013-06-22 20:23:24 +0100
commitbdc3775aa29accfdcd106a1003aa1d598609c28c (patch)
tree4383d665db8cb2acf828c454c703440b67cd6ede /compiler/codeGen
parent3660ef9554de9953cb27d4e8dd007a3ab499abab (diff)
downloadhaskell-bdc3775aa29accfdcd106a1003aa1d598609c28c.tar.gz
Add a work-around for #7978.
This patch fixes profiling at the cost of losing cost centre accounting in a very small number of cases. I am working on a better fix.
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/StgCmmBind.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index eb1bfe93e7..4996c6f1fa 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -209,7 +209,7 @@ cgRhs id (StgRhsCon cc con args)
cgRhs name (StgRhsClosure cc bi fvs upd_flag _srt args body)
| null fvs -- See Note [Nested constant closures]
- = do { (info, fcode) <- cgTopRhsClosure Recursive name cc bi upd_flag args body
+ = do { (info, fcode) <- cgTopRhsClosure Recursive name dontCareCCS bi upd_flag args body
; return (info, fcode >> return mkNop) }
| otherwise
= do dflags <- getDynFlags
@@ -234,7 +234,12 @@ False, which is fair enough.)
Simple solution: compile the RHS as if it was top level. Then
everything works. A minor benefit is eliminating the allocation code
-too. -}
+too.
+
+GBM: when we compile the RHS as if it were top level, the cost centre stack in
+the StgRhsClosure is no longer valid. For now we replace the cost centre stack
+with dontCareCCS.
+-}
------------------------------------------------------------------------
-- Non-constructor right hand sides