[commit: ghc] wip/T10613: State hack hack in ticky report (8ecac0e)

git at git.haskell.org git at git.haskell.org
Wed Mar 30 16:03:32 UTC 2016


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

On branch  : wip/T10613
Link       : http://ghc.haskell.org/trac/ghc/changeset/8ecac0e40f8dc54c8e010c43b36dfa5e71dd2f33/ghc

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

commit 8ecac0e40f8dc54c8e010c43b36dfa5e71dd2f33
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.


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

8ecac0e40f8dc54c8e010c43b36dfa5e71dd2f33
 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