Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Compiler Optimization Flag /Ot

William_D_2
Beginner
423 Views

So i am working on porting an existing windows code to a Unix code. In visual studio i used the option /Ot but this does not exist in the unix system. Many of the other optimization flags in the Reference manual discribe what options are enabled when the flag is called. Is there some secret Intel List of which compiler options are activated when /Ot is used?

0 Kudos
2 Replies
TimP
Honored Contributor III
423 Views

As far as I can see, /Ot would be a default option for ICL, so would not imply anything other than default for icc or icpc.  The ICL documentation seems confusing, but as it says /Os might be compared with /O1, it seems to imply /Ot is higher (default) optimization.  In the past (prior to VS2012), there was no auto-vectorization in the Microsoft compiler, from which this option came.  If you don't want auto-vectorization (except where specified by pragma [omp] simd), you might set -fno-vec.

0 Kudos
Yuan_C_Intel
Employee
423 Views

Hi, William

/Ot is a compatible optimization option with Visual Studio. That's why it's not needed for Linux.

From Microsoft MSDN, /Ot implies /O2 which is the default optimization.

https://msdn.microsoft.com/en-us/library/f9534wye.aspx?f=255&MSPPError=-2147217396

I think you can take it as the default on Linux. -O2 as well is ok.

Hope this helps.

Thanks.

0 Kudos
Reply