Community
cancel
Showing results for 
Search instead for 
Did you mean: 
bungeetux
Beginner
111 Views

Annotated source listing for template

Jump to solution
I use /Qopt-report-annotate to annotate source files with optimisation reporting. It's very useful and simple to use. I go directly to the part that I know is slow and I read what the compiler have done. Nonetheless when there is template code (in a header file), we have no annotated file for each template instantiation. The information is available via /Qopt-report:3 but then we have to go back and forth between the header file and the optrpt file to verify each optimisation. Is there any option to have also these template annotated. Such a feature will be greatly appreciated.
0 Kudos
1 Solution
jimdempseyatthecove
Black Belt
111 Views

You are assuming that all template expansions produce the same (optimized) code. This assumption is incomplete. A similar circumstance exists with optimization of inline functions. Each instance of either may be unique.

Jim Dempsey

View solution in original post

3 Replies
jimdempseyatthecove
Black Belt
112 Views

You are assuming that all template expansions produce the same (optimized) code. This assumption is incomplete. A similar circumstance exists with optimization of inline functions. Each instance of either may be unique.

Jim Dempsey

View solution in original post

bungeetux
Beginner
111 Views
For sure template expansions produce different optimize code. A quick view of inline functions or template code with annotations in the destination file will be more explicit than to review the complete report where the information is spreaded. But I understand that template instantiation produce a lot of possibilities so it is perhaps non desirable. Benoit
jimdempseyatthecove
Black Belt
111 Views

I haven't done this personally, what may be of use is to place identifying comments at the beginning and end of the template, then generate assembly output with source. You should then be able to write a filter program that excises everything but the template/inline function instances. Then looking at what remains may be of some use.

Jim Dempsey

Reply