rcox2 added a comment.

Of course, it would be my preference to mirror the functionality of what is 
available in the "new" hierarchical form of optimization report Intel compiler. 
 So, I would like to distinguish between what Hal is proposing (which we call 
an "annotated listing") and what I am proposing, which we call an "optimization 
report".

If Hal wants to call what he is proposing the "optimization report", then we 
need to come up with another name for what I am proposing.

To summarize what the Intel compiler has

  -qopt-report[=N]     where the default is 2 and the range is 1-5, with 1 
having the least detail and 5 having the most detail 
  -qopt-report-file=F   where F is a file name or stdout or stderr 
  -qopt-report-phase=P where P is a sequence of phases (like ipo,cg, etc.) and 
only those phases are printed 
  -qopt-report-filter=X  where X allows you to filter opt reports only for 
certain routines or parts of routines 

Use of ANY of these implies the generation of an opt report, so you don't need 
to say:

  -qopt-report -qopt-report-file=stderr

since

  -qopt-report-file=stderr 

is sufficient.

On a slightly different topic ....

      

One key question I have about Hal's proposal is whether there is any annotation 
associated with code that is inlined, beyond noting the call site that is 
inlined.

For example, if we have:

   int foo() { 
       ... 
       loop 
       ....
  } 
  int main() { 
      ...
      foo(); 
      ...
   } 

and foo gets inlined, we have two loops of interest, the loop in foo() and the 
loop inlined into main().  Each of these could be vectorized, unrolled, etc. 
and it isn't always the case that both loops would have the same properties.  
So, does Hal's report indicate info only about the loop in foo(), or are the 
properties of the two loops ANDed or ORed together and reported next to the 
loop in foo, or something else?

In general, you want info about both loops, and you can that with a classic 
optimization report.  But it's not clear how to effectively represent this on 
the lightweight annotated listing.  And it is often the case that the inlined 
loop is actually the more executed one, and therefore more important.


http://reviews.llvm.org/D19678



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to