Brussels / 3 & 4 February 2024


ML Guided Optimizations in LLVM

We motivate using ML policies to replace fine-grained compiler optimization decisions, otherwise made by heuristics, and discuss:

  • the current infrastructure available in the main repository of an open source compiler, Clang/LLVM;
  • lessons learned from the practical application of ML on two optimizations over the last few years: a register allocation policy, and a size-optimizing inliner policy, both trained with an open source solution, on both internal and open-source projects, such as Chrome and Fuchsia;
  • what we discovered as obstacles to the broader application of ML optimizations, and to broader community adoption.

We'll conclude with current status and investigation directions.


Photo of Mircea Trofin Mircea Trofin