<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 6, 2014 at 6:54 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank" class="cremed">clattner@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class=""><br></div><div>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.</div>
</div></blockquote><div><br></div><div>Yup, working on one. Will send it out in the coming days.</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div class=""><blockquote type="cite"><div dir="ltr">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 (<a href="http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-fopt-info-747" target="_blank" class="cremed">http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-fopt-info-747</a>).</div>
</blockquote><div><div dir="ltr"><br></div></div></div><div dir="ltr">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?</div>
</div></div></blockquote><div><br></div><div>Used heavily in our optimization team. It's no altogether different from what I've seen in other compilers in the past. I don't intend to mimic the complete UI, I only want to convey the same information.</div>
<div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>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 :-)</div>
</div></blockquote><div><br></div><div>Absolutely. Every note must always be emitted with location information on the instruction that generates it. In GCC, the compiler keeps track of source LOCs at all times. But in Clang, we will want to turn on -gline-tables-only when reports are requested.</div>
<div><br></div><div>The UI is based exclusively on source LOCs. We want to preserve the exact same formatting used for warnings/errors so that we can feed these notices back to editors, IDEs, etc.</div><div><br></div><div>
<br></div><div>Diego.</div></div></div></div>