[commit: ghc] master: WorkWrap: Rip out unsafeGlobalDynFlags usage in mkWwInlineRule (db4f064)

git at git.haskell.org git at git.haskell.org
Fri Jun 8 00:06:41 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/db4f064eca209fde171d8a108cace6f27a5e9b27/ghc

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

commit db4f064eca209fde171d8a108cace6f27a5e9b27
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Jun 7 13:20:49 2018 -0400

    WorkWrap: Rip out unsafeGlobalDynFlags usage in mkWwInlineRule
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4775


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

db4f064eca209fde171d8a108cace6f27a5e9b27
 compiler/coreSyn/CoreUnfold.hs | 6 +++---
 compiler/stranal/WorkWrap.hs   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs
index 20c8d0d..3d26d3c 100644
--- a/compiler/coreSyn/CoreUnfold.hs
+++ b/compiler/coreSyn/CoreUnfold.hs
@@ -104,10 +104,10 @@ mkDFunUnfolding bndrs con ops
                   , df_args = map occurAnalyseExpr ops }
                   -- See Note [Occurrence analysis of unfoldings]
 
-mkWwInlineRule :: CoreExpr -> Arity -> Unfolding
-mkWwInlineRule expr arity
+mkWwInlineRule :: DynFlags -> CoreExpr -> Arity -> Unfolding
+mkWwInlineRule dflags expr arity
   = mkCoreUnfolding InlineStable True
-                   (simpleOptExpr unsafeGlobalDynFlags expr)
+                   (simpleOptExpr dflags expr)
                    (UnfWhen { ug_arity = arity, ug_unsat_ok = unSaturatedOk
                             , ug_boring_ok = boringCxtNotOk })
 
diff --git a/compiler/stranal/WorkWrap.hs b/compiler/stranal/WorkWrap.hs
index 8da2a12..6289ba0 100644
--- a/compiler/stranal/WorkWrap.hs
+++ b/compiler/stranal/WorkWrap.hs
@@ -562,7 +562,7 @@ splitFun dflags fam_envs fn_id fn_info wrap_dmds res_info rhs
                 -- inl_inline: see Note [Wrapper NoUserInline]
                 -- inl_rule:   RuleMatchInfo is (and must be) unaffected
 
-            wrap_id   = fn_id `setIdUnfolding`  mkWwInlineRule wrap_rhs arity
+            wrap_id   = fn_id `setIdUnfolding`  mkWwInlineRule dflags wrap_rhs arity
                               `setInlinePragma` wrap_prag
                               `setIdOccInfo`    noOccInfo
                                 -- Zap any loop-breaker-ness, to avoid bleating from Lint



More information about the ghc-commits mailing list