[commit: ghc] wip/T10613: State hack hack in ticky report (169ffb3)

git at git.haskell.org git at git.haskell.org
Tue Mar 29 12:05:13 UTC 2016


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

On branch  : wip/T10613
Link       : http://ghc.haskell.org/trac/ghc/changeset/169ffb3a52c063482f4036d0d3bae51b50437ffa/ghc

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

commit 169ffb3a52c063482f4036d0d3bae51b50437ffa
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.


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

169ffb3a52c063482f4036d0d3bae51b50437ffa
 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