Commit db4f064e authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

WorkWrap: Rip out unsafeGlobalDynFlags usage in mkWwInlineRule

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4775
parent 64c71ce9
......@@ -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 })
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment