On Thu, Aug 2, 2012 at 1:15 AM, Ralf Jahr <ralf.jahr@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi, > > I tried in the last days to reconstruct an optimization level by just using > the individual optimization flags. Well, it did not work at all. > > My basic idea was to take the list from "-Q -v" and use it. But there still > were some differences where comparing the list from a basic optimization > level with the list from the flags. > > Also, as I am working with a processor simulator (gem5), I was able to > compare the performance of both programs. There was a big difference between > using e.g. O3 and setting the flags. > > Also I found this FAQ entry: > > http://gcc.gnu.org/wiki/FAQ#optimization-options > > Ian, is this still valid? Yes. The -O option is not simply the sum of -f options. Different -O levels enable optimizations that are not controlled by any -f option. Also, some -f options depend on a specific -O level. Ian