[commit: ghc] wip/T14068: Revert "If there is a artificial no-inline-pragma, do not bother creating an unfolding" (951b10d)

git at git.haskell.org git at git.haskell.org
Wed Nov 8 03:20:45 UTC 2017


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

On branch  : wip/T14068
Link       : http://ghc.haskell.org/trac/ghc/changeset/951b10db1fc720f0fb43d50d8e6515821d48031a/ghc

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

commit 951b10db1fc720f0fb43d50d8e6515821d48031a
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Nov 7 17:48:42 2017 -0500

    Revert "If there is a artificial no-inline-pragma, do not bother creating an unfolding"
    
    This reverts commit 1d811710f9681693f3dcdd647a1231dcebc8bce1.


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

951b10db1fc720f0fb43d50d8e6515821d48031a
 compiler/basicTypes/BasicTypes.hs | 8 +-------
 compiler/simplCore/Simplify.hs    | 4 +---
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/compiler/basicTypes/BasicTypes.hs b/compiler/basicTypes/BasicTypes.hs
index 3e5fbfe..a866153 100644
--- a/compiler/basicTypes/BasicTypes.hs
+++ b/compiler/basicTypes/BasicTypes.hs
@@ -88,7 +88,7 @@ module BasicTypes(
         InlineSpec(..), noUserInlineSpec,
         InlinePragma(..), defaultInlinePragma, alwaysInlinePragma,
         neverInlinePragma, dfunInlinePragma,
-        isDefaultInlinePragma, isNeverInlinePragma,
+        isDefaultInlinePragma,
         isInlinePragma, isInlinablePragma, isAnyInlinePragma,
         inlinePragmaSpec, inlinePragmaSat,
         inlinePragmaActivation, inlinePragmaRuleMatchInfo,
@@ -1352,12 +1352,6 @@ isDefaultInlinePragma (InlinePragma { inl_act = activation
                                     , inl_inline = inline })
   = noUserInlineSpec inline && isAlwaysActive activation && isFunLike match_info
 
-isNeverInlinePragma :: InlinePragma -> Bool
-isNeverInlinePragma (InlinePragma { inl_act = activation
-                                  , inl_rule = match_info
-                                  , inl_inline = inline })
-  = noUserInlineSpec inline && isNeverActive activation && isFunLike match_info
-
 isInlinePragma :: InlinePragma -> Bool
 isInlinePragma prag = case inl_inline prag of
                         Inline -> True
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index b576e8a..532b7ee 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -41,7 +41,7 @@ import CoreOpt          ( pushCoTyArg, pushCoValArg
 import Rules            ( mkRuleInfo, lookupRule, getRules )
 import Demand           ( mkClosedStrictSig, topDmd, exnRes )
 import BasicTypes       ( TopLevelFlag(..), isNotTopLevel, isTopLevel,
-                          RecFlag(..), Arity, isNeverInlinePragma )
+                          RecFlag(..), Arity )
 import MonadUtils       ( mapAccumLM, liftIO )
 import Maybes           (  orElse )
 import Control.Monad
@@ -3263,8 +3263,6 @@ simplLetUnfolding env top_lvl cont_mb id new_rhs unf
   = simplStableUnfolding env top_lvl cont_mb id unf
   | isExitJoinId id
   = return noUnfolding -- see Note [Do not inline exit join points]
-  | isNeverInlinePragma (idInlinePragma id)
-  = return noUnfolding -- Do not bother creating one if we never inline anyways
   | otherwise
   = mkLetUnfolding (seDynFlags env) top_lvl InlineRhs id new_rhs
 



More information about the ghc-commits mailing list