A Machine Learning Framework for Compiler Optimizations

Rakesh Kumar Mahendran, V Raghav, K Ragavendar · 2025

Scholar academics have focused on how machine learning (ML) techniques need to be utilized for compiler improvement. The use of robust machine learning-based compilers in the general-purpose space is not in sight yet, though. MLGO integrates ML technology practices from the industrial LLVM compiler. This case study details the specifics and results of replacing the LLVM heuristics-based in-lining-for-size compiler optimization with machine-learned models. To the knowledge of anyone, this work is the first extensive application of machine learning on a complex compiler pass in a real-world context. It exists in the main LLVM repository. In comparison to cutting-edge LLVM-Oz, the two best machine learning algorithms, Policy Gradient and Evolutionary Methods, can minimize the size by up to 7% when training the in-lining-for-size model. This strategy makes CNN models fairer and more stable and produces more credible and dependable machine learning solutions for a variety of industries when used in conjunction with real-time bias detection and novel evaluation methods. It is a vital strategy to fix a number of problems in model development and deployment, and it may greatly increase the equity and accuracy of the models. Following months of aggressive research, the same model trained from a single corpus performs well when tested on the same target set as well as a range of real targets. In using machine learning techniques in real-world applications, it pays to utilize this learned model characteristic.

Read the paper · More papers on PaperTik