<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"MS UI Gothic";
        panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
        {font-family:"\@MS UI Gothic";
        panose-1:2 11 6 0 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">(Re-adding llvm-dev)<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Robinson, Paul
<br>
<b>Sent:</b> Wednesday, April 18, 2018 9:25 AM<br>
<b>To:</b> 'Eric Christopher'; David Blaikie<br>
<b>Cc:</b> Simon Cook; Frozen; nd<br>
<b>Subject:</b> RE: [llvm-dev] Why LLVM doesn't have debug information of function right parentheses</span><span style="font-size:10.0pt;font-family:"MS UI Gothic","sans-serif"">?</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">What I've heard from our users is that inconsistency is unfriendly.  If it always hits the brace, or never hits the brace, great.  If it sometimes hits the
 brace, that's not so good.  (Being able to predict whether it will hit the brace based on eyeballing the source, would be acceptable.  If two similar-looking functions have different behavior, that's very unsettling.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> llvm-dev [<a href="mailto:llvm-dev-bounces@lists.llvm.org">mailto:llvm-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>Eric Christopher via llvm-dev<br>
<b>Sent:</b> Tuesday, April 17, 2018 6:25 PM<br>
<b>To:</b> David Blaikie<br>
<b>Cc:</b> Simon Cook; Frozen; <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>; nd<br>
<b>Subject:</b> Re: [llvm-dev] Why LLVM doesn't have debug information of function right parentheses</span><span style="font-size:10.0pt;font-family:"MS UI Gothic","sans-serif"">?</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">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*)<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I was in favor of the current method for a few reasons:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thoughts?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-eric<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Apr 17, 2018 at 12:26 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">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)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">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:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal">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" 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" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>