Core Concepts
ACPO introduces a novel framework for AI-enabled compiler-driven program optimization, leveraging machine learning models to enhance LLVM's optimization passes. The approach aims to improve performance and code generation through ML integration.
Abstract
The ACPO paper presents a framework that integrates machine learning models into compilers for program optimization. It focuses on Loop Unroll and Function Inlining passes, showcasing improved performance compared to LLVM's O3 optimization level. The implementation involves training ML models on sample data, collecting features from code regions, and utilizing persistent ML interfaces for inference. The results demonstrate speedups of up to 4.5% on Polybench and 2.4% on Cbench benchmarks.
Stats
Experimental results reveal an average speedup of 4% with ACPO model for Loop Unroll pass.
ACPO provides up to 4.5% speedup on Polybench and 2.4% on Cbench compared to LLVM's O3 optimization.
ACPOLUModel is designed as a 5-layer Neural Net with ReLu activation layer for loop unrolling predictions.
Features used in the model are derived from LLVM IR and passed as input vectors during inference.