Improvements to demand analysis
This patch collects a few improvements triggered by Trac #15696, and fixing Trac #16029 * Stop making toCleanDmd behave specially for unlifted types. This special case was the cause of stupid behaviour in Trac #16029. And to my joy I discovered the let/app invariant rendered it unnecessary. (Maybe the special case pre-dated the let/app invariant.) Result: less special-case handling in the compiler, and better perf for the compiled code. * In WwLib.mkWWstr_one, treat seqDmd like U(AAA). It was not being so treated before, which again led to stupid code. * Update and improve Notes There are .stderr test wibbles because we get slightly different strictness signatures for an argumment of unlifted type: <L,U> rather than <S,U> for Int# <S,U> rather than <S(S),U(U)> for Int
Showing
- compiler/basicTypes/Demand.hs 25 additions, 99 deletionscompiler/basicTypes/Demand.hs
- compiler/simplStg/StgLiftLams/Analysis.hs 1 addition, 1 deletioncompiler/simplStg/StgLiftLams/Analysis.hs
- compiler/stranal/DmdAnal.hs 10 additions, 18 deletionscompiler/stranal/DmdAnal.hs
- compiler/stranal/WwLib.hs 165 additions, 48 deletionscompiler/stranal/WwLib.hs
- testsuite/tests/numeric/should_compile/T7116.stdout 4 additions, 4 deletionstestsuite/tests/numeric/should_compile/T7116.stdout
- testsuite/tests/simplCore/should_compile/T13143.stderr 2 additions, 2 deletionstestsuite/tests/simplCore/should_compile/T13143.stderr
- testsuite/tests/simplCore/should_compile/T13543.stderr 7 additions, 4 deletionstestsuite/tests/simplCore/should_compile/T13543.stderr
- testsuite/tests/simplCore/should_compile/T3772.stdout 2 additions, 2 deletionstestsuite/tests/simplCore/should_compile/T3772.stdout
- testsuite/tests/simplCore/should_compile/T4930.stderr 2 additions, 2 deletionstestsuite/tests/simplCore/should_compile/T4930.stderr
- testsuite/tests/simplCore/should_compile/spec-inline.stderr 2 additions, 2 deletionstestsuite/tests/simplCore/should_compile/spec-inline.stderr
- testsuite/tests/stranal/should_compile/Makefile 5 additions, 0 deletionstestsuite/tests/stranal/should_compile/Makefile
- testsuite/tests/stranal/should_compile/T16029.hs 12 additions, 0 deletionstestsuite/tests/stranal/should_compile/T16029.hs
- testsuite/tests/stranal/should_compile/T16029.stdout 11 additions, 0 deletionstestsuite/tests/stranal/should_compile/T16029.stdout
- testsuite/tests/stranal/should_compile/all.T 2 additions, 0 deletionstestsuite/tests/stranal/should_compile/all.T
- testsuite/tests/stranal/sigs/HyperStrUse.stderr 2 additions, 2 deletionstestsuite/tests/stranal/sigs/HyperStrUse.stderr
- testsuite/tests/stranal/sigs/T12370.stderr 4 additions, 4 deletionstestsuite/tests/stranal/sigs/T12370.stderr
- testsuite/tests/stranal/sigs/T8598.stderr 2 additions, 2 deletionstestsuite/tests/stranal/sigs/T8598.stderr
Loading
Please register or sign in to comment