[commit: ghc] wip/T14152: Do not preInlineUnconditionally exit join points (7ecbc76)

git at git.haskell.org git at git.haskell.org
Tue Aug 29 17:40:49 UTC 2017


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

On branch  : wip/T14152
Link       : http://ghc.haskell.org/trac/ghc/changeset/7ecbc76ff6be76b192195956169a1a7c04455dac/ghc

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

commit 7ecbc76ff6be76b192195956169a1a7c04455dac
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Aug 29 18:12:57 2017 +0100

    Do not preInlineUnconditionally exit join points


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

7ecbc76ff6be76b192195956169a1a7c04455dac
 compiler/simplCore/SimplUtils.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index b01955c..f7be9df 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -1065,6 +1065,7 @@ preInlineUnconditionally dflags env top_lvl bndr rhs
   | isTopLevel top_lvl && isBottomingId bndr = False -- Note [Top-level bottoming Ids]
   | not (gopt Opt_SimplPreInlining dflags)   = False
   | isCoVar bndr                             = False -- Note [Do not inline CoVars unconditionally]
+  | isJoinId bndr, isOneOcc (idOccInfo bndr), occ_in_lam (idOccInfo bndr) = False
   | otherwise = case idOccInfo bndr of
                   IAmDead                    -> True -- Happens in ((\x.1) v)
                   occ at OneOcc { occ_one_br = True }



More information about the ghc-commits mailing list