A Graph-Based Algorithm for Optimizing GCC Compiler Flag Settings - Sajjadinasab, Reza; Arora, Sanjay; Drepper, Ulrich; Sanaullah, Ahmed; Herbordt, Martin (IEEE Conference on High Performance Extreme Computing (Online), 2024)
Compiler tuning through external mechanisms such as source code modifications, e.g., with pragmas, and adjusting compiler flags - is well-explored. Many researchers have shown significant performance improvement through different approaches, including heuristics and machine learning. Most of these approaches, however, require a few hundred iterations to converge towards an optimal answer. A number of studies have addressed this problem by reducing the number of iterations required, but we find that further improvements are still possible. In this work, we explore the optimization of GCC compiler flag settings with the goal of faster convergence. We find as an ancillary result that the effectiveness of the compilation itself is sometimes improved with respect to both code size reduction and application program execution time. The proposed graph-based approach can reduce the code size to 90 % of the convergence point with 15 compilations fewer on average, i.e., the solution found after running Opentuner for many compilations. It also can reduce the execution time over the -O3 level for different versions of the Smith-Waterman and Bubble Sort by 1.2 × and 5 × , respectively.