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?
Refer to the below links for more information on Optimization flags:
Recommendations for optimization options:
ICC developer guide:
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.
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?
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.