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

git at git.haskell.org git at git.haskell.org
Thu Mar 31 11:23:07 UTC 2016


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

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

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

commit fd25aed26677ff497bc25a7b37c61a0ea83c2772
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.


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

fd25aed26677ff497bc25a7b37c61a0ea83c2772
 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