diff options
| author | simonpj@microsoft.com <unknown> | 2009-11-10 17:20:17 +0000 |
|---|---|---|
| committer | simonpj@microsoft.com <unknown> | 2009-11-10 17:20:17 +0000 |
| commit | f07f25fdbac2b885aea6aa62c0326840c85f7b59 (patch) | |
| tree | dce1f4577be32828e4b7f9197ca0df75f540374d | |
| parent | 7fa25f74d02cf36cb4997477c7527324104c74ee (diff) | |
| download | haskell-f07f25fdbac2b885aea6aa62c0326840c85f7b59.tar.gz | |
Don't inline a loop breaker, even if it has an INLINE pragma
We preserve the InlineRule on loop breakers, in the hope that they'll
stop being a loop breaker later. So don't inline them!
| -rw-r--r-- | compiler/simplCore/SimplUtils.lhs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs index dfe9e836c9..1511a2fd31 100644 --- a/compiler/simplCore/SimplUtils.lhs +++ b/compiler/simplCore/SimplUtils.lhs @@ -777,6 +777,10 @@ postInlineUnconditionally env top_lvl bndr occ_info rhs unfolding activeInline :: SimplEnv -> OutId -> Bool activeInline env id + | isNonRuleLoopBreaker (idOccInfo id) -- Things with an INLINE pragma may have + -- an unfolding *and* be a loop breaker + = False -- (maybe the knot is not yet untied) + | otherwise = case getMode env of SimplGently { sm_inline = inlining_on } -> inlining_on && isEarlyActive act |
