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

DLL with IPO?

Matt_F_1
Beginner
615 Views
I'm trying to build a DLL using IPO. While ipo seems to be running, the optimization report does not show any significant optimization occurring (no inlining, vectorization, etc). Turning off IPO does result in vectorization. The DLL is being created with the Intel compiler.

I'm using the IDE (it's a requirement), but the build log is attached (zipped as forum doesn't allow uploading html?!). Is there some flag conflict here? I'm essentially just adding /Qipo to the command-line arguments.

Note the eventual goal is a mixed F95/C DLL, but I'm unable to get IPO to work even with a simple "hello world" DLL.

Thanks,
Matt

0 Kudos
9 Replies
Matt_F_1
Beginner
615 Views
Editing the message removed the attachment?! -- Re-attached.
0 Kudos
JenniferJ
Moderator
615 Views

From the link output, IPO is done.

ipo: remark #11000: performing multi-file optimizations
ipo: remark #11005: generating object file ipo_25366obj.obj

Besides adding /Qipo to the additional compile options, you can turn it on under the Project property->General->Whole Program Optimization, select "Link time optimization".

See if this makes any difference.

If it does, there's a bug somewhere.

0 Kudos
Matt_F_1
Beginner
615 Views
I see a slightly different option, but if I turn it on via:

Properties->General->"Whole Program Optimization"->"Use link time code generation"

the only thing that changes is I get a warning from the Microsoft Linker (after xilink is done) to remove /LTCG as it is unnecessary.

Yes, it does seem that IPO is running in some fashion, but the optimization report does not show any significant optimizations occurring. Is this a bug in the optimization report, or in IPO itself?

Thanks,
Matt


0 Kudos
JenniferJ
Moderator
615 Views

The warning is ok because our linker xilink doesn't understand /LTCG.

So the problem is between /Qipo and no /Qipo. What do you get without /Qipo? Could you upload the buildlog?

0 Kudos
Matt_F_1
Beginner
615 Views
Without IPO I get vectorization messages (attached). This does not use /Qopt-report:2 /Qopt-report-phase:all as the output would be rather long.

With IPO I would also expect inline messages as there are some very small functions called only once, but from different source files (this actually already happens even without IPO).

I could upload the entire sample project if you wish.

- Matt
0 Kudos
Matt_F_1
Beginner
615 Views
Here is a very simple sample project (attached).

With the "Release" configuration (uses IPO) opt-report shows almost no optimizations. Using the "Release-noipo" configuration one sees vectorization (adding /Qopt-report:2 /Qopt-report-phase:all will show much more).

Perhaps this is a bug with opt-report, and not IPO per se. Although even the default vectorization messages no longer appear.

Thanks,
- Matt
0 Kudos
JenniferJ
Moderator
615 Views

Thanks for the test case.

It's a bug in the xilink. I'll create a bug report. if you know how to access Premier Support, please report with this testcase as well.

I found a work-around. Using /QxT instead of /QaxT. Also it's fixed in the next release.

0 Kudos
Matt_F_1
Beginner
615 Views
This is Premier Issue 507540. I had already given the reproducer there, but had not heard much specific back.

So what specifically is happening? Is only vectorization being skipped, with the other optimizations just not being reported via opt-report? IPO does improve performance for me somewhat.

/QxT does produce vectorization, but I still don't get any report of inlining or other optimizations with /Qopt-report:2 /Qopt-report-phase:all (except for unref var removal and pack-merge). I also cannot use that for my shipping code as we must support multiple processors.

This will be fixed in the next point release, or version 11? Approximately when?


Thank you,
Matt


0 Kudos
JenniferJ
Moderator
615 Views

This issue has been fixed in the 11.0 compiler. The latest pkg is 11.0.074.

Jennifer

0 Kudos
Reply