improve dead code elimination in CorePrep
|Reported by:||nfrisby||Owned by:||nfrisby|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||simplCore/should_compile/T7796||Blocked By:|
|Blocking:||Related Tickets:||#4962 #5433|
Description (last modified by simonpj)
#4962 is about generating code for (and allocating at runtime!) bindings that are kept alive only by RULEs even though the RULEs are useless downstream of .hi file generation.
Simon Marlow's patch for #5433 switched to a custom dead code eliminator, since the "(case) binder swap" in OccurAnal was creating breaking some code generator invariants.
However, that custom dead code generator doesn't do a dependency analysis, so a letrec like this
let f = [g] \r [...] -> ... g = [g] \r [...] -> ... in ... g ...
is sent to the code generator without dropping f.
A patch to use a dependency analysis in CorePrep's dead code eliminator improves allocation for several nofib programs (largest: cryptarithm2, knights, fem).
Min -0.0% -4.2% -7.7% -7.7% -5.9% Max +0.0% +0.0% +4.3% +4.3% +14.3% Geometric Mean -0.0% -0.1% -0.2% -0.2% +0.2%
Change History (4)
comment:3 Changed 12 months ago by nfrisby
- Resolution set to fixed
- Status changed from new to closed