Mon 5 - Sat 10 December 2022 Auckland, New Zealand
Mon 5 Dec 2022 14:30 - 15:00 at Seminar Room G100 - Session 2 Chair(s): Stefan Marr

Optimizing compilers rely on many hand-crafted heuristics to guide the optimization process. However, the interactions between different optimizations makes their design a difficult task. We propose using machine learning models to either replace such heuristics or to support their development process, for example, by identifying important code features. Especially in static compilation, machine learning has been shown to outperform hand-crafted heuristics. We applied our approach in a state-of-the-art dynamic compiler, the GraalVM compiler. Our models predict an unroll factor for vectorized loops for which the GraalVM compiler developers have not been able to design satisfactory heuristics. Thereby, we identified features to describe vectorized loops and empirically evaluated the impact of different training data, features or model parameters on the accuracy of the learned models. When deployed in the GraalVM dynamic compiler, our models produce significant speedups of 8-11%, on average. Furthermore, large speedups unveiled a performance bug in the compiler which was fixed after our report. Our work shows that machine learning can be used to improve a dynamic compiler directly by replacing existing vectorization heuristics or indirectly by helping compiler developers to design better hand-crafted heuristics.

Mon 5 Dec

Displayed time zone: Auckland, Wellington change

13:30 - 15:00
Session 2VMIL at Seminar Room G100
Chair(s): Stefan Marr University of Kent
Virgil as a Systems Programming Language
Ben L. Titzer Carnegie Mellon University
Improving Vectorization Heuristics in a Dynamic Compiler with Machine Learning Models
Raphael Mosaner JKU Linz, Gergö Barany Oracle Labs, David Leopoldseder Oracle Labs, Hanspeter Mössenböck JKU Linz