[LLVMdev] RFC - Adding an optimization report facility?

Chris Lattner clattner at apple.com
Thu Mar 6 15:54:02 PST 2014


On Mar 6, 2014, at 11:07 AM, Diego Novillo <dnovillo at google.com> wrote:
> The context of this is performance analysis of generated code. My interest is to trace at a high-level the major decisions done by the various optimizers. For instance, when the inliner decides to inline foo into bar, or the loop unroller decides to unroll a loop N times, or the vectorizer decides to vectorize a loop body.
...

> Before I get too far into this, do folks think this is a good idea? I'm open to reasonable requests on how the facility should work, etc.

This is a great idea, and many people would welcome it.  Please write up a concrete proposals about how this will work, and we can iterate on that though.

> My intent is to introduce an optimization report option to LLVM which passes will be able to use to indicate the major decisions they make. Initially, I am tempted to mimic GCC's -fopt-info (http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-fopt-info-747).

I'm not sure if this is the best design or not (having never used it) - what feedback have you heard from (non-compiler-hacker) people trying to use it?

IMO, the hard part of doing something like this is getting the user experience right.  It does you no good to say "hey I unrolled a loop" if you don't have enough location information to tell the user *which* loop got unrolled.  The key is to give them actionable information, not just the output of -debug :-)

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140306/9cf1c595/attachment.html>


More information about the llvm-dev mailing list