[commit: ghc] wip/T14068-inline: Revert "Prevent inlining of loopified programs" (20b00bd)

git at git.haskell.org git at git.haskell.org
Wed Feb 21 05:04:04 UTC 2018


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

On branch  : wip/T14068-inline
Link       : http://ghc.haskell.org/trac/ghc/changeset/20b00bd9fcb5e0e5b115f0796f2b59005856234d/ghc

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

commit 20b00bd9fcb5e0e5b115f0796f2b59005856234d
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Feb 21 00:03:27 2018 -0500

    Revert "Prevent inlining of loopified programs"
    
    This reverts commit b4ab3a5f1fa051be9c5689f7ecef16458b2d700d, to get new
    measurements on how loopification fares with inlining enabled.


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

20b00bd9fcb5e0e5b115f0796f2b59005856234d
 compiler/coreSyn/CoreOpt.hs  | 8 +-------
 compiler/stranal/WorkWrap.hs | 1 -
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs
index d97a015..57812e4 100644
--- a/compiler/coreSyn/CoreOpt.hs
+++ b/compiler/coreSyn/CoreOpt.hs
@@ -675,14 +675,8 @@ loopificationJoinPointBinding_maybe bndr rhs
                      zapFragileIdInfo $
                      localiseId $
                      bndr
-
         -- RULES etc stay with bindr'
-        -- Also, previously, the function was recursive, and hence not inlineable.
-        -- To tread with caution, let's keep it this way
-        bndr' = (`setIdUnfolding` noUnfolding) $
-                (`setInlinePragma` neverInlinePragma) $
-                (`setIdOccInfo` noOccInfo) $
-                bndr
+        bndr' = zapIdTailCallInfo bndr
     in  Just (bndr', join_bndr, mkLams bndrs body)
 
   | otherwise
diff --git a/compiler/stranal/WorkWrap.hs b/compiler/stranal/WorkWrap.hs
index 4eb2f10..ac8798e 100644
--- a/compiler/stranal/WorkWrap.hs
+++ b/compiler/stranal/WorkWrap.hs
@@ -479,7 +479,6 @@ splitFun dflags fam_envs fn_id fn_info wrap_dmds res_info rhs
             work_act = case work_inline of
               -- See Note [Activation for workers]
               NoInline -> inl_act inl_prag
-              NoUserInline | isNeverActive (inl_act inl_prag) -> NeverActive
               _        -> wrap_act
             work_prag = InlinePragma { inl_src = SourceText "{-# INLINE"
                                      , inl_inline = work_inline



More information about the ghc-commits mailing list