Profile-Feedback Optimization

Hi all!

This is a question about Profile-Feedback Optimization using –Mpfi/–Mpfo.

Whal kinds of optimization are better to turn on when compiling a program on each step?

It seems no optimization needs when compiling with -Mpfi in order to instrument the generated executable for collection of profile and data feedback information. I suppose that some optimizations may disfigure this information. Am I right?

On the other hand agressive optimizations should be turned on to enable or enhance certain performance optimizations e.g. –fastsse –Mipa=fast.

What is the best combination?


Hi Sanik,

Great question! Certain optimizations, “-mp” and “-Mconcur”, are automatically disables when compiling with “-Mpfi” since parallelization can problems during th instrumentations phase. (They’re fine for use with -Mpfo). Also, using -Mipa or -Minline with -Mpfi is not recommended. Other optimizations are fine.

For example if your using “-fastsse -Mipa=fast,inline +PFO” set pass 1 to be “-fastsse -Mpfi” and pass 2 to be “-fastsse -Mipa=fast,inline -Mpfo”.

Hope this helps,