[commit: ghc] master: Fix loss-of-SpecConstr bug (9e47dc4)
git at git.haskell.org
git at git.haskell.org
Tue May 2 11:10:16 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9e47dc451788cce20acb6a8208c56a7e4dbe246b/ghc
>---------------------------------------------------------------
commit 9e47dc451788cce20acb6a8208c56a7e4dbe246b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue May 2 12:04:44 2017 +0100
Fix loss-of-SpecConstr bug
This bug, reported in Trac #13623 has been present since
commit b8b3e30a6eedf9f213b8a718573c4827cfa230ba
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Fri Jun 24 11:03:47 2016 -0700
Axe RecFlag on TyCons.
SpecConstr tries not to specialise indefinitely, and had a
limit (see Note [Limit recursive specialisation]) that made
use of info about whether or not a data constructor was
"recursive". This info vanished in the above commit, making
the limit fire much more often -- and indeed it fired in this
test case, in a situation where specialisation is /highly/
desirable.
I refactored the test, to look instead at the number of
iterations of the loop of "and now specialise calls that
arise from the specialisation". Actually less code, and
more robust.
I also added record field names to a couple of constructors,
and renamed RuleInfo to SpecInfo.
>---------------------------------------------------------------
9e47dc451788cce20acb6a8208c56a7e4dbe246b
compiler/specialise/SpecConstr.hs | 193 ++++++++++++++------------
testsuite/tests/perf/should_run/T13623.hs | 82 +++++++++++
testsuite/tests/perf/should_run/T13623.stdout | 1 +
testsuite/tests/perf/should_run/all.T | 8 ++
4 files changed, 198 insertions(+), 86 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 9e47dc451788cce20acb6a8208c56a7e4dbe246b
More information about the ghc-commits
mailing list