Fast compiler autotuning framework using design of experiments
摘要
Compiler optimizations play a crucial role in achieving high processor performance by improving the efficiency of the machine code they generate through better algorithms and strategies. These optimizations ultimately increase program execution efficiency. Over the past few decades, numerous compiler optimizations have been integrated into compilers, addressing research topics such as instruction scheduling and register allocation. However, selecting the optimal combination of compiler optimization options from a vast number of possibilities remains a challenging task. We proposed a Fast Compiler Autotuning Framework (FCAF), leveraging the systematic application of Design of Experiments (DoE) methods to rapidly narrow down the search space, aimed at efficiently enhancing the effectiveness of auto-tuning optimizations. FCAF achieves performance improvements comparable to state of the art tuning tools while significantly reducing tuning time on LoongArch and X86 platforms. Moreover, we used the orthogonal array design method to select a universal set of compilation options and applied these to the SPEC CPU 2006 benchmark suite. When compared to the GCC-O2 baseline, it increases by 3.89% for integer tasks and by 15.27% for floating-point tasks in benchmark scores. Further validation with real-world HPC applications confirms consistent performance gains.