O3 controls vectorization, aggressive inlining and some experimental optimization technique.
In the past we have tried to introduce CMSSW wide O3 and even Ofast without success.
O3 and even more Ofast introduces in few cases regression that have been considered not acceptable in compilation time, object size, runtime speed, numerical results. ICE and even incorrect results have been also noticed.


In recent GCC version (notably 4.8 and 4.9) inline heuristics have bene modified targeting more advanced optimization technologies such as LTO, LDO and PGO.
This has led to regression in runtime speed in some area of CMSSW.

For the very same reason described above It is very difficult that CMS will use any of this technique CMSSW wide.

This is the reason, since quite a while, a higher granularity optimization strategy has been adopted introducing specific optimization hints in time-critical area.
This has also the advantage that any regression can be easily spot and tracked.

For what GCC is concerned, optimization flags can only be safely set for a whole shared library, that at the moment in CMSSW, naturally match Package granularity.

We plan soon to introduce also -Ofast flags in various packages that are sensitive to speed up in floating point computation. This will introduce regression in numerical results that will require validation. As this will be done package by package control will be surely easier.