What do -ip, -ipo, and -ip_no_inlining do?

What do -ip, -ipo, and -ip_no_inlining do?

Hi! I'm finding the documentation of the -ip, -ipo, and -ip_no_inlining compile options a bit unclear.

Can anyone tellif -ipoimplies -ip? Is the -ip_no_inlining option just a way to override and disable -ip? Or can it be used to disable a part of -ipo?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Morten,

-ip enables single file interprocedural optimization.
-ipo enables multi-file interprocedural optimization.

So if you have your src code organized with 5 functions in file1.cpp,another 5in file2.cpp, -ip will enable optimizations across the 5 functions in file1.cpp. -ipo enables optimization across all 10 functions in both file1.cpp & file2.cpp. So -ipo implies -ip.

-ip_no_inlining- disable full and partial inlining
This disables a part of -ipo.It prevents inling (useful if code size is important) - one of the major benefits of using ipo, but enables other ipo optimizations: help disambiguate pointers (helps vectorization + other optimizations), interprocedural constant propogation, dead code elimination, etc.
-ip_no_inlining is an advanced switch, use it when you determine that your code is running slower due to inlining, but you want to keep the additional benefits.

Leave a Comment

Please sign in to add a comment. Not a member? Join today