In this paper, we propose a statistical method to determine the setting of compiler options. Conventionally, programmers use standard -Ox settings which are provided by compiler developers. However, in order to obtain maximal performance, it is necessary to tune the compiler setting for the application as well as the underlying architecture. In this paper, we propose a methodology to con?gure compiler options automatically using pro?le information. We apply non-parametric statistical analysis, in particular the Mann-Whitney test, to decide whether to turn on or to turn off compiler flags. This approach produces compiler settings of gcc 3.3.1 for the SPEC2000 benchmark suite that outperform the standard -Ox switches on a Pentium 4 processor.