On Tue, 10 Nov 2020, 19:20 Ezhil P via Gcc-help, <gcc-help@xxxxxxxxxxx> wrote: > hi, > came across this in website > > *https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html* > <https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html> > > > ............................................................................................................. > > -fprofile-use > > -fprofile-use=*path* > > Enable profile feedback-directed optimizations, and the following > optimizations, *many of which are generally profitable only with profile > feedback available: * > > -fbranch-probabilities -fprofile-values > > -funroll-loops -fpeel-loops -ftracer -fvpt > > -finline-functions -fipa-cp -fipa-cp-clone -fipa-bit-cp > > -fpredictive-commoning -fsplit-loops -funswitch-loops > > -fgcse-after-reload -ftree-loop-vectorize -ftree-slp-vectorize > > -fvect-cost-model=dynamic -ftree-loop-distribute-patterns > > -fprofile-reorder-functions > > > ......................................................................................................... > > > O3 optimization uses most of these flags. > > > Since it has been mentioned as above I assumed that some optimization flags > specified here cannot function without profile info. > No, that's not what it says. > > Can you please clarify whether the flags mentioned above can function > without using profile information by just specifying O3? > Some of them work much better with profile information, but some work OK even without profile information. The text you quoted above doesn't say they don't function, it says they don't function **well**. And it doesn't say that is true for all of them.