Skip to content

Reduce inlining in deeply-nested cases

Simon Peyton Jones requested to merge wip/T18730 into master

This patch deals with #18730 (closed) by tracking the "case depth".

  • Add one to the case depth when simplifying the alternatives of a multi-branch case
  • Be increasingly less enthusiastic to inline as the case depth increases

It doesn't fully solve the problem. As there is a hard tradeoff between solving #18730 (closed) and risking runtime regressions. However by default it will help in some cases. While also providing a knob which allows solving the problem for specific programs/modules.

Edited by Andreas Klebinger

Merge request reports