Intel icc: how to dump optimized code as C file?

Technically -fdump-tree-optimized don't dump a C representation, but a textual partial representation of the Gimple code used inside GCC (Gimple is the middle-end internal representation of instructions, on which most GCC target-independent optimization passes operate).

Up vote 4 down vote favorite 1 share g+ share fb share tw.

Gcc's -fdump-tree-optimized option dumps an optimized version of your C code as a C file. Is there a way I can do the same using intel's icc compiler? I have a matrix multiplication code that I have compiled as icc -O3 -ipo mult.c.

I want to view how the compiler has performed optimizations. If nothing works, then I shall generate the assembly code for the program. C compiler intel compiler-optimization icc link|improve this question asked Oct 25 '11 at 22:49KVM39518 90% accept rate.

If this is for a "real" application other than personal fun, you're much better off (in terms of performance and development time) using an existing library that implements General Matrix Multiply, such as GNU Scientific Library, or other implementation of BLAS library – TJD Oct 26 '11 at 0:45 Nopes, this is part of a class project that teaches compiler optimizations and similar topics. – KVM Oct 26 '11 at 1:03.

Technically, -fdump-tree-optimized don't dump a C representation, but a textual partial representation of the Gimple code used inside GCC (Gimple is the middle-end internal representation of instructions, on which most GCC target-independent optimization passes operate). But icc is a proprietary compiler (a black box), so from the point of view of its provider, it is not interesting (for Intel) to show how icc works. GCC has the ability to show its internal representations, because it is a free software.

Proprietary compilers don't want to show how they work. If this is a class, you could perhaps try also LLVM. (But I don't know how do dump internal representations inside).

And more importantly, if this is a class, you might suggest your student using GCC 4.6 to develop a plugin or a GCC MELT extension to explore and experiment optimizations. MELT is a high-level domain specific language to extend GCC and it provides many features to ease such tasks.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions