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

How to disable in-lining?

Andres_M_Intel4
Employee
535 Views
I would like to completely disable inlining to understand how optimizations are done,
and I couldn't get from documentation if -O0 disables inlining as doing -fno-inline.

Is -O0implying -fno-inline?
0 Kudos
3 Replies
Feilong_H_Intel
Employee
535 Views
-inline-level=0 (Linuxand Mac) or /Ob0 (Windows)
0 Kudos
TimP
Honored Contributor III
535 Views
Yes, -O0 should disable in-lining optimization. For linux, to disable in-lining at higher levels of optimization, -fno-inline-functions (a gcc option) is recommended.
0 Kudos
jimdempseyatthecove
Honored Contributor III
535 Views
__declspec( noinline )
void foo()
{
...
}

Jim Dempsey
0 Kudos
Reply