Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

flags implied with O2 on Linux IA32

nlarbale
Beginner
152 Views
Hello All,

I'm trying to isolate a ~20% performance degredation that I see when compiling my program with O2 vs O1. So far I've tried setting -unroll0, -ob2 but I'm having trouble locating the rest of the implied flags for O2 from the compiler documentation on the Linux IA32 platform

anyone that can point me to a reference or fill me in would be appreciated!

thanks

0 Kudos
3 Replies
TimP
Black Belt
152 Views
I assume you mean some version of icc or icpc. If your application is such that -O1 performs consistently better than -O2, you probably want that option anyway. -O2 sets /Qvec, which is likely to be counter-productive if your program spends no time running such for loops with counts > 30 or so. It also sets /Ob2 in recent versions; the default level has varied among releases. Perhaps you want to turn off in-lining entirely, or set it down to /Ob1 (inline only where inline keyword is set).
nlarbale
Beginner
152 Views
sorry running icpc, and yes this particular test does not involve much looping

I'll try your suggestion

Om_S_Intel
Employee
152 Views
Yoy may use Vtune Amplifierto find the hot spot and investigate the performance degradation.
Reply