[commit: ghc] wip/T10613: State hack hack in ticky report (4ee615d)

git at git.haskell.org git at git.haskell.org
Wed Mar 23 13:47:57 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T10613
Link       : http://ghc.haskell.org/trac/ghc/changeset/4ee615d7a7345c7d3b6a6c627adf5c9a7d7f5bc8/ghc

>---------------------------------------------------------------

commit 4ee615d7a7345c7d3b6a6c627adf5c9a7d7f5bc8
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Mar 23 11:10:25 2016 +0100

    State hack hack in ticky report
    
    In the ticky report, do not mark a function with a State# argument as
    its first argument as single-entry.


>---------------------------------------------------------------

4ee615d7a7345c7d3b6a6c627adf5c9a7d7f5bc8
 compiler/codeGen/StgCmmClosure.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index b467048..3b83b8e 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -234,7 +234,10 @@ mkLFReEntrant _ _ [] _
   = pprPanic "mkLFReEntrant" empty
 mkLFReEntrant top fvs args arg_descr
   = LFReEntrant top os_info (length args) (null fvs) arg_descr
-  where os_info = idOneShotInfo (head args)
+  where
+    state_hack_hack = isStateHackType (idType (head args))
+    os_info | state_hack_hack = noOneShotInfo
+            | otherwise       = idOneShotInfo (head args)
 
 -------------
 mkLFThunk :: Type -> TopLevelFlag -> [Id] -> UpdateFlag -> LambdaFormInfo



More information about the ghc-commits mailing list