Community
cancel
Showing results for 
Search instead for 
Did you mean: 
282 Views

List of optimization flags

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
282 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-program...

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

282 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

RahulV_intel
Moderator
282 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

RahulV_intel
Moderator
282 Views

Hi Venkat,

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

 

--Rahul

RahulV_intel
Moderator
282 Views

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

Reply