Don't trim sum CPR information
As a spin-off of #5075 (comment 189240), I investigated whether we still need to trim CPR information of non-top-level bindings returning sums, mostly because we don't wanted to CPR and spoil join points. This was the root issue why the test case of #5075 (closed) still isn't CPR'd properly. @simonpj argued that
this whole thing about sum-CPR may be rendered moot by
Note [Don't CPR join points]
inWorkWrap
. It seems that we compute CPR info for join points, but do not use that info for w/w, regardless of whether it's a sum type.
So, what happens when we never or always trim sum CPR information?
(Here used to be old results from !5075 (closed), but things have changed) Here are NoFib results from 19-01-21 (>=0.5% changes only):
--------------------------------------------------------------------------------
Program Allocs Instrs
--------------------------------------------------------------------------------
calendar +0.1% +0.7%
circsim +0.2% +0.5%
cryptarithm1 -4.4% -3.0%
fem -0.0% +0.7%
fibheaps -0.4% +1.1%
integer 0.0% +1.0%
last-piece +0.0% +0.8%
primes +0.0% -1.3%
prolog -0.6% +0.3%
--------------------------------------------------------------------------------
Min -4.4% -3.0%
Max +0.2% +1.1%
Geometric Mean -0.0% +0.0%
Binary sizes go up by ~1%.
It's a bit mixed, but I tend to say that we can get rid of the special case just to have simpler code and enable Nested Sums in the future.