Automatic selection of GCC optimization options using a gene weighted genetic algorithm
San-Chih Lin, Chi-Kuang Chang, Nai-Wei Lin · 2008
Compilers usually provide a large number of optimization options for users to fine tune the performance of their programs. However, most users don’t have the capability to select suitable optimization options. Compilers hence usually provide a number of optimization levels. Each optimization level is a pre-selected group of optimization options and produces good efficiency for most programs. However, they exploit only a portion of the available optimization options. There is still a large potential that an even better efficiency can be gained for each specific source code by exploiting the rest of the available optimization options. We propose a gene weighted genetic algorithm to search for optimization options better than optimization levels for each specific source code. We also show that this new genetic algorithm is more effective than the basic genetic algorithm for a set of benchmarks.