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

Whole Program Optimization != /Qipo

piet_de_weer
Beginner
427 Views

I found something strange yesterday.

From reading (a lot of) documentation, I had concluded that enabling 'Whole Program Optimization' corresponded to adding '/Qipo' to the compiler parameters.

For my application, I'm always getting bad results for 'Whole Program Optimization' (slight performance drop), even though - given the fact that I often call functions in another object file from within loops - I would have expected an improvement.

Yesterday I tried what would happen if I add /Qipo to the compiler parameters, INSTEAD OF enabling 'Whole Program Optimization'.

Result: Code compiled with /Qipo and WITHOUT Whole Program Optimization is about 5% faster, and the binary that comes out is smaller, than with Whole Program Optimization. With WPO enabled it doesn't matter whether I add /Qipo or not.

/Qipo improves the performance of my code by about 4%, WPO degrades it with about 1%.

Is this a bug?

Compiler version 10.1.013 IA-32.

0 Kudos
4 Replies
TimP
Honored Contributor III
427 Views
ICL ipo and CL whole program optimization are somewhat similar but incompatible ways of accomplishing similar goals. ICL would not respond to a setting of WPO for CL, if that is what you mean.
0 Kudos
piet_de_weer
Beginner
427 Views

Well, enabling WPO in the project settings (which I suppose is what you mean by 'a setting of WPO for CL') does have some effect - the vectorization info is shown during linking instead of during compiling. And the output file is different.

Also, /Qipo can (as far as I know?) not be set in the project settings, only by manually adding it to the compiler parameters. So I think most people will never start using it and only enable WPO - which (at least in my case) degrades the performance instead of improving it, as /Qipo does.

Anyway, I'll just use /Qipo from now on - which works great.

0 Kudos
TimP
Honored Contributor III
427 Views
When I go to Intel C++ properties, the specific Visual Studio selection is labeled clearly as /Qipo, so I'm confused about how there could be a confusion. It's enabled by default (in release mode) with current compiler versions, so it's more difficult to avoid using it than to turn it on.
0 Kudos
piet_de_weer
Beginner
427 Views

I'm not at home right now so I can't check it, but I googled a bit and found that this option is not availalbe from the menus in 10.1 compiler versions - which is what I'm using. So that probably explains the confusion - the only option that I saw was "whole program optimization". It's not enabled by default either, the only way seems to be to manually add it to the compiler options.

Note: Enabling both Whole Program Optimization and /Qipo still hurts performance (/Qipo has no effect in that case), so it might be a good idea to put a warning on the 'WPO' setting. The name suggests an improvement...

0 Kudos
Reply