[commit: ghc] wip/T10918: Ticket #10918: Inline singly used things even more aggressively (3f964ae)
git at git.haskell.org
git at git.haskell.org
Wed Oct 7 14:43:47 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T10918
Link : http://ghc.haskell.org/trac/ghc/changeset/3f964ae1b32c968c26a86843aecf2fa0e2ab6f3e/ghc
>---------------------------------------------------------------
commit 3f964ae1b32c968c26a86843aecf2fa0e2ab6f3e
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Wed Oct 7 16:45:39 2015 +0200
Ticket #10918: Inline singly used things even more aggressively
>---------------------------------------------------------------
3f964ae1b32c968c26a86843aecf2fa0e2ab6f3e
compiler/simplCore/SimplUtils.hs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index f8945b3..987576e 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -1037,8 +1037,9 @@ preInlineUnconditionally dflags env top_lvl bndr rhs
-- See Note [pre/postInlineUnconditionally in gentle mode]
act = idInlineActivation bndr
try_once in_lam int_cxt -- There's one textual occurrence
+ | isSingleUsed (idDemandInfo bndr) = isNotTopLevel top_lvl
| not in_lam = isNotTopLevel top_lvl || early_phase
- | otherwise = (int_cxt && canInlineInLam rhs) || isSingleUsed (idDemandInfo bndr)
+ | otherwise = int_cxt && canInlineInLam rhs
-- Be very careful before inlining inside a lambda, because (a) we must not
-- invalidate occurrence information, and (b) we want to avoid pushing a
More information about the ghc-commits
mailing list