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

List of optimization flags

s__venkatakeerthy
1,619 Views

Hi,

Is it possible to invoke individual optimizations separately with ICC? For eg: Can dead code elimination pass be invoked on source code? If possible, is there a document that lists the supported optimization flags?

Thanks,

Venkat

0 Kudos
5 Replies
RahulV_intel
Moderator
1,619 Views

Hi Venkat,

Refer to the below links for more information on Optimization flags:

https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-optimization-and-programming-guide

Recommendations for optimization options:

https://software.intel.com/en-us/articles/step-by-step-optimizing-with-intel-c-compiler

ICC developer guide:

https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference

To answer your question, with the -O flag(defaults to -O2 on icc), various optimizations can be invoked(including dead code elimination), which happens under the hood. The number next to O(ex: -O2 or -O3) specifies varying levels of optimization.

 

--Rahul

0 Kudos
s__venkatakeerthy
1,619 Views

Hi Rahul,

Thanks for your response.

I understand that various passes are invoked in the standard set of optimization sequences like -O1/2/3. But is there a way to invoke them individually? 

 

-Venkat

0 Kudos
RahulV_intel
Moderator
1,619 Views

Hi,

PFA file containing exhaustive list of various optimization flags that could be invoked.

On Linux platform, after sourcing the compiler, type "icc --help" on the terminal to view all the supported flags by icc. In the Compiler options list, under the subheading Optimizations/IPO/Advanced Optimizations, choose any flag of your choice for invoking individual optimizations on your program.

 

--Rahul

0 Kudos
RahulV_intel
Moderator
1,619 Views

Hi Venkat,

Let us know if your issue is resolved, so that we can close the thread.

 

--Rahul

0 Kudos
RahulV_intel
Moderator
1,619 Views

We are closing this thread assuming that the solution provided helped. Feel free to post a new thread if your issue still persists.

0 Kudos
Reply