[commit: ghc] wip/T13227: Bind educated guess: count OneShotInfos in occ_one_shots (88dcbc6)

git at git.haskell.org git at git.haskell.org
Sun Feb 5 17:46:27 UTC 2017


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

On branch  : wip/T13227
Link       : http://ghc.haskell.org/trac/ghc/changeset/88dcbc63ae3482c55e96c12ab02ebc9a820781ff/ghc

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

commit 88dcbc63ae3482c55e96c12ab02ebc9a820781ff
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Feb 5 12:34:48 2017 -0500

    Bind educated guess: count OneShotInfos in occ_one_shots
    
    so lets see what perf.haskell.org has to say.


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

88dcbc63ae3482c55e96c12ab02ebc9a820781ff
 compiler/simplCore/OccurAnal.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs
index 39daa8d..e3fef9d 100644
--- a/compiler/simplCore/OccurAnal.hs
+++ b/compiler/simplCore/OccurAnal.hs
@@ -1867,7 +1867,7 @@ occAnalApp env (Var fun, args, ticks)
        -- This is the *whole point* of the isRhsEnv predicate
        -- See Note [Arguments of let-bound constructors]
 
-    n_val_args = valArgCount args + length (occ_one_shots env)
+    n_val_args = valArgCount args + length (takeWhile isOneShotInfo (occ_one_shots env))
 
     n_args     = length args
     fun_uds    = mkOneOcc env fun (n_val_args > 0) n_args



More information about the ghc-commits mailing list