diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-12-16 12:57:17 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-09 16:21:40 -0500 |
commit | 891a791f3f2438e5d768e1f96119d275e58e8d37 (patch) | |
tree | 5a051da2d04b14ce92bdcb98a5c5ab84c9d344fb /testsuite/tests/dependent | |
parent | ab5fd982a7a501136cb8b90fa841c02cc9551b5a (diff) | |
download | haskell-891a791f3f2438e5d768e1f96119d275e58e8d37.tar.gz |
Reduce inlining in deeply-nested cases
This adds a new heuristic, controllable via two new flags to
better tune inlining behaviour.
The new flags are -funfolding-case-threshold and
-funfolding-case-scaling which are document both
in the user guide and in
Note [Avoid inlining into deeply nested cases].
Co-authored-by: Andreas Klebinger <klebinger.andreas@gmx.at>
Diffstat (limited to 'testsuite/tests/dependent')
-rw-r--r-- | testsuite/tests/dependent/should_compile/all.T | 12 | ||||
-rw-r--r-- | testsuite/tests/dependent/should_compile/dynamic-paper.stderr | 15 |
2 files changed, 8 insertions, 19 deletions
diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T index cf5c76d380..a368edd128 100644 --- a/testsuite/tests/dependent/should_compile/all.T +++ b/testsuite/tests/dependent/should_compile/all.T @@ -10,14 +10,18 @@ test('RaeBlogPost', normal, compile, ['']) test('mkGADTVars', normal, compile, ['']) test('TypeLevelVec',normal,compile, ['']) test('T9632', normal, compile, ['']) -# The dynamic-paper test fails in the profasm way if we don't increase + +# dynamic-paper used to run out of simplfier ticks because of +# infinite inlining, but the new case-depth mechanism cuts that off, +# so it now compiles fine. +# +# Historical notes: The dynamic-paper test fails in the profasm way if we don't increase # the simplifier tick limit. If we do, we run out of stack # space. If we increase the stack size enough with -K, # we run out of simplifier ticks again. This is # discussed in #11330. -test('dynamic-paper', - expect_broken_for(11330, ['profasm']), - compile_fail, ['']) +test('dynamic-paper', normal, compile, ['']) + test('T11311', normal, compile, ['']) test('T11405', normal, compile, ['']) test('T11241', normal, compile, ['']) diff --git a/testsuite/tests/dependent/should_compile/dynamic-paper.stderr b/testsuite/tests/dependent/should_compile/dynamic-paper.stderr deleted file mode 100644 index b05335047f..0000000000 --- a/testsuite/tests/dependent/should_compile/dynamic-paper.stderr +++ /dev/null @@ -1,15 +0,0 @@ -Simplifier ticks exhausted - When trying UnfoldingDone delta1 - To increase the limit, use -fsimpl-tick-factor=N (default 100). - - If you need to increase the limit substantially, please file a - bug report and indicate the factor you needed. - - If GHC was unable to complete compilation even with a very large factor - (a thousand or more), please consult the "Known bugs or infelicities" - section in the Users Guide before filing a report. There are a - few situations unlikely to occur in practical programs for which - simplifier non-termination has been judged acceptable. - - To see detailed counts use -ddump-simpl-stats - Total ticks: 140801 |