diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-04-27 17:42:01 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-04-28 09:55:07 +0100 |
commit | 29d88ee173bc9b04245a33d5268dda032f5dc331 (patch) | |
tree | 688151bb35bc2fca1a475507511735ad0d4f180c /testsuite/tests/simplCore | |
parent | a1b753e8b1475659440f524b3e66dfbea31c5787 (diff) | |
download | haskell-29d88ee173bc9b04245a33d5268dda032f5dc331.tar.gz |
Be a bit more eager to inline in a strict context
If we see f (g x), and f is strict, we want to be a bit more eager to
inline g, because it may well expose an eval (on x perhaps) that can
be eliminated or shared.
I saw this in nofib boyer2, function RewriteFuns.onewayunify1. It
showed up as a consequence of the preceding patch that makes the
simplifier do less work (Trac #13379). We had
f d (g x)
where f was a class-op. Previously we simplified both d and
(g x) with a RuleArgCtxt (making g a bit more eager to inline).
But now we simplify only d that way, then fire the rule, and
only then simplify (g x). Firing the rule produces a strict
funciion, so we want to make a strict function encourage
inlining a bit.
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T12603.stdout | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T12603.stdout b/testsuite/tests/simplCore/should_compile/T12603.stdout index 277aa18f6b..57a2a246e2 100644 --- a/testsuite/tests/simplCore/should_compile/T12603.stdout +++ b/testsuite/tests/simplCore/should_compile/T12603.stdout @@ -1 +1 @@ -lvl = case GHC.Real.$wf1 2# 8# of v { __DEFAULT -> GHC.Types.I# v } + = case GHC.Real.$wf1 2# 8# of ww4 { __DEFAULT -> GHC.Types.I# ww4 } |