<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 18, 2015 at 1:53 PM, Sergey Dmitrouk <span dir="ltr"><<a href="mailto:sdmitrouk@accesssoftek.com" target="_blank">sdmitrouk@accesssoftek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Paul,<br>
<span class=""><br>
On Mon, May 18, 2015 at 12:04:17PM -0700, Robinson, Paul wrote:<br>
> There's no doubt that fast-isel could do better with debug locations.<br>
> The local value map does seem to be one source of problems in this area.<br>
> It looks like you are trying the tactic of eliminating the local value<br>
> map entirely.  This has the unfortunate effect of causing fast-isel to<br>
> emit redundant constant loads, which is very sad.<br>
<br>
</span>I understand that, but emitting redundant loads is the only way to get<br>
correct locations in *all* cases.  GCC does this for -O0 and assembly it<br>
generates matches source code really closely.<br></blockquote><div><br>Yep - there are competing uses of -O0 though, one is "fast compile time" the other is "debugging accuracy" and so we can't make changes to -O0 that might hurt compile time (or even executable performance) at -O0 without some consideration for those use cases. Since this would be a strict regression in code size (& thus, indirectly performance) it might be a hard sell to make for -O0. (& not appropriate for -gN, unfortunately)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> I wonder if a better tactic would be this: Don't attach any debug location<br>
> to a local value map instruction at first; this avoids the "random" debug<br>
> location problem.  Then when you are finishing up the block, find the first<br>
> "real" debug location, and copy it to the first instruction in the block.<br>
> This avoids having the beginning of the block implicitly use the last debug<br>
> location of the physically preceding block, which will usually be wrong too.<br>
><br>
> What do you think?<br>
<br>
</span>This would be a decent improvement on its own, I think I'll try to do this.<br>
It solves the actual issue I'm fighting here.  I just thought that more<br>
generic solution might be of interest, but this should do it for this case.<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
</font></span><div class="HOEnZb"><div class="h5">Sergey<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>