
#5075: CPR optimisation for sum types if only one constructor is used
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner: simonpj
Type: feature request | Status: patch
Priority: normal | Milestone: 7.6.2
Component: Compiler | Version: 7.0.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by nfrisby):
Confirmed: the Just gets ww'd-away with this core2core pipeline:
SpecConstr, simpl, stranal, wwsplit, simpl.
{{{
Rec {
$w$s$wloop
$w$s$wloop =
\ w_sqX w1_sqY ->
case w_sqX of ds_Xng {
__DEFAULT ->
$w$s$wloop
(-# ds_Xng 1) (case w1_sqY of _ { I# x_anM -> I# (+# x_anM 1)
});
0 -> (# w1_sqY #)
}
end Rec }
loop_$s$wloop [InlPrag=INLINE[0]]
:: ...
[...
Str=DmdType