- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As of Intel C/C++ compiler version 14.0.2.144, is it possible to make optimization report print out information on dead code elimination decisions? I have a case where I suspect that dead code elimination occurs. I have scrutinized the compiler output with "-opt-report=3", but could not find any hints on dead code elimination.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The interprocedural phase should optimize for dead code if any in the application. The option "-opt-report-phase=ipo -opt-report=2" should ouput the routines that were dead and eliminated.
_Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrey,
If you meant just a piece of code within a routine, we have never reported this in the opt report, and don’t have any plans at the moment to do that in future releases.
But if you meant dead function elimination, then you can just use -opt-report
For example:
%cat t.c
static int foo()
{
return 5;
}
extern int main()
{
return foo();
}
%icc t.c -opt-report
<;-1:-1;IPO ROUTINE ATTRIBUTES PROPAGATION;;0>
ROUTINE ATTRIBUTE PROPAGATION TOTALS:
RDECL: NSE(0->0) AR(0->0) NORET(0->0) DR(0->0) NT(0->0)
RDECL: MF(0->0) OMPPAR(0->0)
.....
.....
<t.c;-1:-1;IPO DEAD STATIC FUNCTION ELIMINATION;foo;0>
DEAD STATIC FUNCTION ELIMINATION:
(foo)
Routine was called explicity
<t.c;-1:-1;PGO;main;0>
STATIC:t.c main
<t.c;-1:-1;PGO;foo;0>
STATIC:t.c foo
<;-1:-1;PGO;;0>
2 FUNCTIONS HAD VALID STATIC PROFILES
IPO CURRENT QUALITY METRIC: 50.0%
IPO POSSIBLE QUALITY METRIC: 50.0%
IPO QUALITY METRIC RATIO: 100.0%
Hope the above answers your question
_Kittur

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page