A Content Based Filtering Approach for the Automatic Tuning of Compiler Optimizations (Turkish Journal of Computer and Mathematics Education (TURCOMAT), 2021)
Recently a large number of compiler conversions have been implemented to optimize programs.  A comprehensive exploration of all possible sequences of optimization  is not practical because the search space is huge considering the large number of compiler optimizations passes. In addition, predicting the effectiveness of these optimizations is not an easy task.  In this work, the suggested approach offers automatic tuning of compiler optimization sequences in place of manually tuning by recommended optimization sequences based on program features. Techniques inspired from the Recommendation System (RS) field to provide a solution to the autotuning of compiler optimizations problem. Content Based filtering method is finding a group of programs that are closest to the unseen program based on the similarity of their features. Then the best optimization sequences for these programs are recommended to the unseen one. Two versions of the CBF method, with and without rate value are presented.The approach is evaluated using three benchmark suites PolyBench, Shootout, and Stanford, including 50 different programs and using LLVM (Low Level Virtual Machine) compiler passes down Linux Ubuntu. Results obtained showed that such method is superior to the standard level of optimization -O3 of LLVM compiler in improving the execution time  by an average of 9.3 % for CBF without rate, 13.7% for CBF with rate.