<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 26, 2017 at 2:05 PM Robinson, Paul <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_6776327603684539340WordSection1">
<p class="MsoNormal" style="margin-left:4.8pt">Doesn't need to be merged with the insertion point, I don't think? Does this merge across basic blocks? or just raise the uses of a constant to the beginning of a single basic block?<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_6776327603684539340__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_6776327603684539340WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I read the pass as looking for a dominating insertion point across multiple basic blocks. Doesn't mean the insertion point necessarily is in a different block,
but I *think* it could be.</span></p></div></div></blockquote><div><br></div><div>Yeah, still seems like it might be nice to keep the location if it doesn't cross a basic block boundary.<br><br>Adrian - any ideas/thoughts on all this?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_6776327603684539340WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></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""> David Blaikie [mailto:<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>]
<br>
<b>Sent:</b> Monday, September 25, 2017 5:06 PM<br>
<b>To:</b> Robinson, Paul; <a href="mailto:reviews%2BD38088%2Bpublic%2B4bc8f3de9212eeb7@reviews.llvm.org" target="_blank">reviews+D38088+public+4bc8f3de9212eeb7@reviews.llvm.org</a>; Voss, Matthew; <a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>; <a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a></span></p></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_6776327603684539340WordSection1"><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"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
<b>Cc:</b> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<b>Subject:</b> Re: [PATCH] D38088: Fix out-of-order stepping behavior in programs with hoisted constants.<u></u><u></u></span></p></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_6776327603684539340WordSection1"><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"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Fri, Sep 22, 2017 at 12:22 PM Robinson, Paul <<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>> wrote:<u></u><u></u></p>
</div></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_6776327603684539340WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">(re-adding llvm-commits)</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">If this is motivated by SPGO issues - should it be using mergeDebugLocations, then (& thus only changing the location if they come from different basic blocks)?<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Well, you could consider it a merge of all the uses, but then it should also be merged with the insertion
point, which is chosen to dominate the uses.</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Doesn't need to be merged with the insertion point, I don't think? Does this merge across basic blocks? or just raise the uses of a constant to the beginning of a single basic block?<br>
<br>
If it does work across basic block, then yeah, merging the location may be insufficient (since the location could be the same but still be merging across basic blocks... - not sure what the best way to detect/handle that is)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> Intuitively it seemed unlikely this would ever produce a real debug location. (Also, in a sense
this is an artificially generated instruction and from that perspective having no source location is also appropriate.)</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Do you want us to pursue the extra bookkeeping? I'm having a hard time imagining this coming up
in the wild (i.e., not convinced it's worth the effort, but you're a lot better at that than I am).</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><br>
I'd guess at a macro that uses the same constant a few times (in which case they'll have the same location) or maybe a single line statement (with column info disabled) using the constant a few times/in a few places.<br>
<br>
I'd think it'd be worth checking how this works for some simple cases with a single basic block, etc. Maybe seeing how often that such a merge would fire on a real codebase maybe, etc.<br>
<br>
- Dave<br>
<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><a href="https://reviews.llvm.org/D38088" target="_blank">https://reviews.llvm.org/D38088</a><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
</div>
</div>
</blockquote>
</div></div></div></div></div></blockquote></div></div>