ponyc icon indicating copy to clipboard operation
ponyc copied to clipboard

Optimisation pass order tuning

Open Praetonus opened this issue 9 years ago • 1 comments

We're currently using the standard LLVM pass order when optimising programs. This doesn't look like the best strategy as I've often observed improvements to the generated IR when rerunning opt on it. We should tune the pass order to suit our needs more precisely.

Current areas to investigate:

  • Range check elimination in loop. Some useless checks aren't eliminated even when the loop invariant is trivial.
  • Dead code elimination. Some dead code (apparently mostly dead stores) isn't eliminated.
  • heap2stack and mergerealloc order. These Pony-specific passes currently run multiple times in the optimisation pipeline. This is not ideal since they take quite a long time to complete. Reducing the number of runs without losing final code quality would be good.

Praetonus avatar Sep 05 '16 17:09 Praetonus

This is a really good idea.

sylvanc avatar Sep 07 '16 20:09 sylvanc