<div dir="ltr">Remembering a discussion as to why we do this from a few years ago: (*makes note to start writing design decisions this way down somewhere*)<div><br></div><div>I was in favor of the current method for a few reasons:</div><div><br></div><div>a) ensuring that it would "always happen" that we had either a unified return block or a well propagated location onto return instructions seemed like it would be difficult to maintain and very subject to optimization differences.</div><div>b) The "always stop at the end brace of the function" seemed weirder to me than just being able to say "finish" when stepping in a debugger</div><div>c) I worried about profiling information that used debug information being accurate or ascribing cycles to the closing brace of a function which seemed to be a loss of fidelity.</div><div><br></div><div>Thoughts?</div><div><br></div><div>-eric<br><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 17, 2018 at 12:26 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I really wouldn't be sure this is the right direction to go anyway - as pointed out, there coudl be a return of a constant which would be a single instruction & it would make more sense to me to attribute that to the line where "return" is written, than where the closing brace is.<br><br>I think this is, for my money, a legitimate difference in implementations between GCC and Clang - not a case of one being right/better than the other.<br><br>(adding echristo@ so he can speak for some of this if he wants to, since they were choices made a while back)</div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Apr 12, 2018 at 9:11 AM Florian Hahn via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On 12/04/2018 15:35, Frozen via llvm-dev wrote:<br>
> I added one attribute named EndLine in LLVM IR before. LLVM's part is <br>
> not hard, but will modify many places in Clang. I success for it, you <br>
> can try this way.<br>
> <br>
<br>
For loops, we use a range to keep track of the start and end of the loop <br>
for remarks: <a href="http://llvm.org/doxygen/classllvm_1_1Loop_1_1LocRange.html" rel="noreferrer" target="_blank">http://llvm.org/doxygen/classllvm_1_1Loop_1_1LocRange.html</a><br>
<br>
Maybe it would make sense to use something similar for function start <br>
and end locations?<br>
<br>
Cheers,<br>
Florian<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></blockquote></div></div></div></div>