Improve performance of eta expansion
Eta expansion was taking ages on T18223. This patch * Aggressively squash reflexive casts in etaInfoApp. See Note [Check for reflexive casts in eta expansion] These changes decreased compile-time allocation by 80%! * Passes the Simplifier's in-scope set to etaExpandAT, so we don't need to recompute it. (This alone saved 10% of compile time.) Annoyingly several functions in the Simplifier (namely makeTrivialBinding and friends) need to get SimplEnv, rather than SimplMode, but that is no big deal. Lots of small changes in compile-time allocation, less than 1% and in both directions. A couple of bigger changes, including the rather delicate T18223 T12425(optasm) ghc/alloc 98448216.0 97121224.0 -1.3% GOOD T18223(normal) ghc/alloc 5454689676.0 1138238008.0 -79.1% GOOD Metric Decrease: T12425 T18223
Showing
- compiler/GHC/Core/Coercion.hs 10 additions, 1 deletioncompiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Opt/Arity.hs 103 additions, 42 deletionscompiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/Simplify.hs 25 additions, 24 deletionscompiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs 14 additions, 6 deletionscompiler/GHC/Core/Opt/Simplify/Utils.hs
Loading
Please register or sign in to comment