<div class="gmail_quote">On Mon, Jun 4, 2012 at 6:04 PM, Caldarale, Charles R <span dir="ltr"><<a href="mailto:Chuck.Caldarale@unisys.com" target="_blank">Chuck.Caldarale@unisys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> From: Eli Friedman [mailto:<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>]<br>
> Subject: Re: [llvm-commits] [LLVMdev] [PATCH] Allow per-thread re-direction of outs()/errs()<br>
<div class="im"><br>
> Basic block names are useless to the user.<br>
<br>
</div>I think that depends on the user.  If clang is your entry point into the game, then yes, basic block names and many other things going on with the IR are probably meaningless.  However, our starting point is llvm::IRBuilder, so having the basic block names and individual instructions available on live, running systems is critical to problem analysis.  Function granularity is by no means sufficient.<br>
</blockquote><div><br></div><div>The emitDiagnostic interface can contain an optional Value* parameter, which the handler can use to reconstruct source level information, using srcloc, debug metadata, etc..  If the originating pass detects an error in a function prototype, it can pass the function pointer.  If an optimizer wants to flag a specific instruction, it can pass that instruction as the Value* parameter.  So it would be up to the pass to determine what level of granularity is sufficient for the particular error/warning/info message, and we can have generic handler fragments that know how to print textual representations of different Value types.</div>
<div><br></div><div>How does this sound?</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
 - Chuck<br>
<br>
<br>
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.<br>

<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>