summaryrefslogtreecommitdiff
path: root/compiler/simplCore/Simplify.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-12-08 15:39:05 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2017-12-08 15:42:55 +0000
commit5695f462f604fc63cbb45a7f3073bc114f9b475f (patch)
tree06794ef33eb835ee89022c8385fef3aadb63f2f0 /compiler/simplCore/Simplify.hs
parent800009d9b78a9b2877e7efc889e8a0b21873990d (diff)
downloadhaskell-5695f462f604fc63cbb45a7f3073bc114f9b475f.tar.gz
Occurrrence analysis improvements for NOINLINE functions
This patch fixes #14567. The idea is simple: if a function is marked NOINLINE then it makes a great candidate for a loop breaker. Implementation is easy too, but it needs a little extra plubming, notably the occ_unf_act field in OccEnv
Diffstat (limited to 'compiler/simplCore/Simplify.hs')
-rw-r--r--compiler/simplCore/Simplify.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index b24163695e..3f60257d04 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -1673,7 +1673,7 @@ completeCall env var cont
(lone_variable, arg_infos, call_cont) = contArgs cont
n_val_args = length arg_infos
interesting_cont = interestingCallContext env call_cont
- unfolding = activeUnfolding env var
+ unfolding = activeUnfolding (getMode env) var
dump_inline unfolding cont
| not (dopt Opt_D_dump_inlinings dflags) = return ()
@@ -1898,7 +1898,7 @@ tryRules env rules fn args call_cont
-}
| Just (rule, rule_rhs) <- lookupRule dflags (getUnfoldingInRuleMatch env)
- (activeRule env) fn
+ (activeRule (getMode env)) fn
(argInfoAppArgs args) rules
-- Fire a rule for the function
= do { checkedTick (RuleFired (ruleName rule))