<div dir="ltr"><div dir="ltr">This should all be solved by r340878, and I'm going to commit an NFC cleanup after that to simplify the code soon.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 11:37 AM 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"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 10:37 AM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.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"><div dir="ltr"><div dir="ltr">CReduce produced:<div><br></div><div><div>typedef long a;</div><div>void __declspec(noreturn) b(char *, int, char *, a, a);</div><div>class c {</div><div>public:</div><div>  char &operator[](long d) {</div><div>    long e = 0, f(g);</div><div>    if (f)</div><div>      b("", 0, "", e, f);</div><div>    return h[d];</div><div>  }</div><div>  char *h;</div><div>  long g;</div><div>};</div><div>class i : public c {</div><div>public:</div><div>  i(long);</div><div>};</div><div>class j : i {</div><div>public:</div><div>  j(long d) : i(d) { (*this)[0] = '\0'; }</div><div>  void k() { (*this)[0]; }</div><div>};</div><div>void l() {</div><div>  j m(8);</div><div>  m.k();</div><div>}</div><div>void n() {}</div></div><div><br></div><div>Compile with:</div><div>clang --target=i686-windows-msvc t.cpp -g -gcodeview -O2 -c<br></div><div><br></div><div>We could revert, but ultimately this is a pre-existing issue in the .cv_loc implementation in MC. I'll try to fix that today.</div></div></div></div></blockquote><div><br>Ah, thanks a bunch! Happy to help if there's anything that comes up/I'd be useful for.<br><br>- Dave<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 10:27 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">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">Yeah, if anyone's seeing failures - I'm all ears for repro steps.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 27, 2018 at 10:59 PM <<a href="mailto:douglas.yung@sony.com" target="_blank">douglas.yung@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_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Is a repro still needed for this issue? Several of our internal tests have also hit an assertion failure that started with this commit.<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>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Douglas Yung<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""> llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>David Blaikie via llvm-commits<br>
<b>Sent:</b> Monday, August 27, 2018 18:43<br>
<b>To:</b> Reid Kleckner<br>
<b>Cc:</b> llvm-commits<br>
<b>Subject:</b> Re: [llvm] r340583 - DebugInfo: Improve debug location merging<u></u><u></u></span></p>
</div>
</div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<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 Mon, Aug 27, 2018 at 6:38 PM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<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">The root of the problem is that we emit assembly like this:<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">calll "?b@@YAXPADH0JJ@Z"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Ltmp10:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.cv_loc 2 1 8 0                 # t.cpp:8:0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.cv_fpo_endproc<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Lfunc_end0:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">                                        # -- End function<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.def "?n@@YAXXZ";<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.scl 2;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.type 32;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.endef<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.globl "?n@@YAXXZ"             # -- Begin function ?n@@YAXXZ<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.p2align 4, 0x90<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">"?n@@YAXXZ":                            # @"?n@@YAXXZ"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Lfunc_begin1:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.cv_func_id 5<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.cv_fpo_proc "?n@@YAXXZ" 0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"># %bb.0:                                # %entry<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.cv_loc 5 1 27 0                # t.cpp:27:0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">retl<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">We are asserting that the label generated by .cv_loc 2 1 8 0 (t.cpp:8:0) comes before the Lfunc_end0 label. In the context of emitting codeview, that makes sense, we are emitting deltas, and they should all be positive.<u></u><u></u></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><br>
What did the assembly look like previously? the .cv_loc 2 1 8 0 must've been attached to some instruction, right? But an instruction that ended up optimized away too late? (after the loc directive had been generated)<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>
<div>
<p class="MsoNormal">The thing is that the .cv_loc directives bind to the *next* instruction emitted, and in this case, ffunction-sections is off, so we bind to the 'retl' instruction in the next function, and we have a negative delta, so we assert.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">DWARF locations are similarly affected, but there's no real problem there, since they just generate one huge line table per section IIRC.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Does anyone know why we wait until we emit an instruction to insert labels? Why don't we do it right at the point of the directive? For .cv_loc, we just copied the behavior from .loc, which I can't explain.<u></u><u></u></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Not sure, to be honest.<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">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 27, 2018 at 6:06 PM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<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>
<p class="MsoNormal">I got the crash files and am running a reduction.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What's happening is that this file has a function with several CHECKs, and their failure cases get commoned together. We're using this new merged source location, and something goes wrong.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 27, 2018 at 5:18 PM Vitaly Buka <<a href="mailto:vitalybuka@google.com" target="_blank">vitalybuka@google.com</a>> wrote:<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">I can't reproduce on Linux.<u></u><u></u></p>
</div>
<p class="MsoNormal"><a href="mailto:rnk@google.com" id="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m_3161419392927273918m_-853760580959907244m_-2860086773400954945plusReplyChip-4" target="_blank">+Reid Kleckner</a> <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 27, 2018 at 5:12 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<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>
<p class="MsoNormal">Yeah, I'm totally open to some ideas on investigating that - can you reproduce this? Does it reproduce not on windows? I'd love some help!<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 27, 2018 at 5:09 PM Vitaly Buka <<a href="mailto:vitalybuka@google.com" target="_blank">vitalybuka@google.com</a>> wrote:<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>
<p class="MsoNormal">This revision breaks windows bot<u></u><u></u></p>
<div>
<p class="MsoNormal"><a href="http://lab.llvm.org:8011/builders/sanitizer-windows/builds/33862/steps/run%20check-sanitizer/logs/stdio" target="_blank">http://lab.llvm.org:8011/builders/sanitizer-windows/builds/33862/steps/run%20check-sanitizer/logs/stdio</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">FAILED: projects/compiler-rt/lib/sanitizer_common/tests/SANITIZER_TEST_OBJECTS.sanitizer_stacktrace_printer_test.cc.i386.o <u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">cmd.exe /C "cd /D C:\b\slave\sanitizer-windows\build\projects\compiler-rt\lib\sanitizer_common\tests && C:\b\slave\sanitizer-windows\build\.\bin\clang.exe -DWIN32 -D_WINDOWS -Wno-unknown-warning-option -fms-compatibility-version=19.00.24215.1 -D_HAS_EXCEPTIONS=0 -Wno-undefined-inline -DGTEST_NO_LLVM_RAW_OSTREAM=1 -DGTEST_HAS_RTTI=0 -IC:/b/slave/sanitizer-windows/llvm/utils/unittest/googletest/include -IC:/b/slave/sanitizer-windows/llvm/utils/unittest/googletest -DGTEST_HAS_SEH=0 -Wno-deprecated-declarations -IC:/b/slave/sanitizer-windows/llvm/projects/compiler-rt/include -IC:/b/slave/sanitizer-windows/llvm/projects/compiler-rt/lib -IC:/b/slave/sanitizer-windows/llvm/projects/compiler-rt/lib/sanitizer_common -fno-rtti -O2 -Werror=sign-compare -Wno-non-virtual-dtor -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -DGTEST_HAS_SEH=0 -gline-tables-only -gcodeview -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o SANITIZER_TEST_OBJECTS.sanitizer_stacktrace_printer_test.cc.i386.o C:/b/slave/sanitizer-windows/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_printer_test.cc"<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">Assertion failed: Result >= 0 && "negative label difference requested", file C:\b\slave\sanitizer-windows\llvm\lib\MC\MCCodeView.cpp, line 449<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">Wrote crash dump file "C:\Users\buildbot\AppData\Local\Temp\clang.exe-30d2bf.dmp"<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.  Make sure the file exists and is readable.  Calling loadDataForExe<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#0 0x021cf367 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0x119f367)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#1 0x72ec91d2 (C:\windows\SYSTEM32\ucrtbase.DLL+0x891d2)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#2 0x72eca7e1 (C:\windows\SYSTEM32\ucrtbase.DLL+0x8a7e1)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#3 0x72ec9c1e (C:\windows\SYSTEM32\ucrtbase.DLL+0x89c1e)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#4 0x72eca8e6 (C:\windows\SYSTEM32\ucrtbase.DLL+0x8a8e6)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#5 0x0201cad9 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0xfecad9)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#6 0x0201e219 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0xfee219)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#7 0x02010b71 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0xfe0b71)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#8 0x020109f6 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0xfe09f6)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#9 0x0201049d (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0xfe049d)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#10 0x01fee676 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0xfbe676)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#11 0x021aa8b3 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0x117a8b3)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">#12 0x0200cd47 (C:\b\slave\sanitizer-windows\build\bin\clang.exe+0xfdcd47)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">clang: error: clang frontend command failed due to signal (use -v to see invocation)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">clang version 8.0.0 (trunk 340583)<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">Target: i686-pc-windows-msvc<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">Thread model: posix<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">InstalledDir: C:\b\slave\sanitizer-windows\build\.\bin<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">clang: note: diagnostic msg: PLEASE submit a bug report to <a href="https://bugs.llvm.org/" target="_blank">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source, and associated run script.<u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">clang: note: diagnostic msg: <u></u><u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></span></pre>
<pre><span class="m_-2466267260489365090m_7459339452183443860m_6697679303298099704m_3687294089277969421m3161419392927273918m-853760580959907244m-2860086773400954945m-5122627779531591990m5155620210423932457m2733026907970272885gmail-stdout"><span style="font-size:13.5pt;color:black">********************</span></span><span style="font-size:13.5pt;color:black"><u></u><u></u></span></pre>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Aug 23, 2018 at 3:36 PM David Blaikie via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<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">
<p class="MsoNormal">Author: dblaikie<br>
Date: Thu Aug 23 15:35:58 2018<br>
New Revision: 340583<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=340583&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=340583&view=rev</a><br>
Log:<br>
DebugInfo: Improve debug location merging<br>
<br>
Fix a set of related bugs:<br>
<br>
* Considering two locations as equivalent when their lines are the same<br>
but their scopes are different causes erroneous debug info that<br>
attributes a commoned call to be attributed to one of the two calls it<br>
was commoned from.<br>
<br>
* The previous code to compute a new location's scope was inaccurate and<br>
would use the inlinedAt that was the /parent/ of the inlinedAt that is<br>
the nearest common one, and also used that parent scope instead of the<br>
nearest common scope.<br>
<br>
* Not generating new locations generally seemed like a lower quality<br>
choice<br>
<br>
There was some risk that generating more new locations could hurt object<br>
size by making more fine grained line table entries, but it looks like<br>
that was offset by the decrease in line table (& address & ranges) size<br>
caused by more accurately computing the scope - which likely lead to<br>
fewer range entries (more contiguous ranges) & reduced size that way.<br>
<br>
All up with these changes I saw minor reductions (-1.21%, -1.77%) in<br>
.rela.debug_ranges and .rela.debug_addr (in a fission, compressed debug<br>
info build) as well as other minor size changes (generally reductinos)<br>
across the board (-1.32% debug_info.dwo, -1.28% debug_loc.dwo). Measured<br>
in an optimized (-O2) build of the clang binary.<br>
<br>
If you are investigating a size regression in an optimized debug builds,<br>
this is certainly a patch to look into - and I'd be happy to look into<br>
any major regressions found & see what we can do to address them.<br>
<br>
Added:<br>
    llvm/trunk/test/DebugInfo/X86/merge_inlined_loc.ll<br>
Modified:<br>
    llvm/trunk/include/llvm/IR/DebugInfoMetadata.h<br>
    llvm/trunk/lib/IR/DebugInfo.cpp<br>
    llvm/trunk/lib/IR/DebugInfoMetadata.cpp<br>
    llvm/trunk/test/DebugInfo/COFF/local-variables.ll<br>
<br>
Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=340583&r1=340582&r2=340583&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=340583&r1=340582&r2=340583&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)<br>
+++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Thu Aug 23 15:35:58 2018<br>
@@ -1479,19 +1479,6 @@ public:<br>
     return getScope();<br>
   }<br>
<br>
-  /// Check whether this can be discriminated from another location.<br>
-  ///<br>
-  /// Check \c this can be discriminated from \c RHS in a linetable entry.<br>
-  /// Scope and inlined-at chains are not recorded in the linetable, so they<br>
-  /// cannot be used to distinguish basic blocks.<br>
-  bool canDiscriminate(const DILocation &RHS) const {<br>
-    return getLine() != RHS.getLine() ||<br>
-           getColumn() != RHS.getColumn() ||<br>
-           getDiscriminator() != RHS.getDiscriminator() ||<br>
-           getFilename() != RHS.getFilename() ||<br>
-           getDirectory() != RHS.getDirectory();<br>
-  }<br>
-<br>
   /// Get the DWARF discriminator.<br>
   ///<br>
   /// DWARF discriminators distinguish identical file locations between<br>
@@ -1539,8 +1526,6 @@ public:<br>
   /// discriminator.<br>
   inline const DILocation *cloneWithDuplicationFactor(unsigned DF) const;<br>
<br>
-  enum { NoGeneratedLocation = false, WithGeneratedLocation = true };<br>
-<br>
   /// When two instructions are combined into a single instruction we also<br>
   /// need to combine the original locations into a single location.<br>
   ///<br>
@@ -1555,9 +1540,8 @@ public:<br>
   ///<br>
   /// \p GenerateLocation: Whether the merged location can be generated when<br>
   /// \p LocA and \p LocB differ.<br>
-  static const DILocation *<br>
-  getMergedLocation(const DILocation *LocA, const DILocation *LocB,<br>
-                    bool GenerateLocation = NoGeneratedLocation);<br>
+  static const DILocation *getMergedLocation(const DILocation *LocA,<br>
+                                             const DILocation *LocB);<br>
<br>
   /// Returns the base discriminator for a given encoded discriminator \p D.<br>
   static unsigned getBaseDiscriminatorFromDiscriminator(unsigned D) {<br>
<br>
Modified: llvm/trunk/lib/IR/DebugInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=340583&r1=340582&r2=340583&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=340583&r1=340582&r2=340583&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)<br>
+++ llvm/trunk/lib/IR/DebugInfo.cpp Thu Aug 23 15:35:58 2018<br>
@@ -690,8 +690,7 @@ unsigned llvm::getDebugMetadataVersionFr<br>
<br>
 void Instruction::applyMergedLocation(const DILocation *LocA,<br>
                                       const DILocation *LocB) {<br>
-  setDebugLoc(DILocation::getMergedLocation(LocA, LocB,<br>
-                                            DILocation::WithGeneratedLocation));<br>
+  setDebugLoc(DILocation::getMergedLocation(LocA, LocB));<br>
 }<br>
<br>
 //===----------------------------------------------------------------------===//<br>
<br>
Modified: llvm/trunk/lib/IR/DebugInfoMetadata.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfoMetadata.cpp?rev=340583&r1=340582&r2=340583&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfoMetadata.cpp?rev=340583&r1=340582&r2=340583&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/IR/DebugInfoMetadata.cpp (original)<br>
+++ llvm/trunk/lib/IR/DebugInfoMetadata.cpp Thu Aug 23 15:35:58 2018<br>
@@ -14,7 +14,7 @@<br>
 #include "llvm/IR/DebugInfoMetadata.h"<br>
 #include "LLVMContextImpl.h"<br>
 #include "MetadataImpl.h"<br>
-#include "llvm/ADT/SmallPtrSet.h"<br>
+#include "llvm/ADT/SmallSet.h"<br>
 #include "llvm/ADT/StringSwitch.h"<br>
 #include "llvm/IR/DIBuilder.h"<br>
 #include "llvm/IR/Function.h"<br>
@@ -69,28 +69,40 @@ DILocation *DILocation::getImpl(LLVMCont<br>
 }<br>
<br>
 const DILocation *DILocation::getMergedLocation(const DILocation *LocA,<br>
-                                                const DILocation *LocB,<br>
-                                                bool GenerateLocation) {<br>
+                                                const DILocation *LocB) {<br>
   if (!LocA || !LocB)<br>
     return nullptr;<br>
<br>
-  if (LocA == LocB || !LocA->canDiscriminate(*LocB))<br>
+  if (LocA == LocB)<br>
     return LocA;<br>
<br>
-  if (!GenerateLocation)<br>
-    return nullptr;<br>
-<br>
   SmallPtrSet<DILocation *, 5> InlinedLocationsA;<br>
   for (DILocation *L = LocA->getInlinedAt(); L; L = L->getInlinedAt())<br>
     InlinedLocationsA.insert(L);<br>
+  SmallSet<std::pair<DIScope *, DILocation *>, 5> Locations;<br>
+  DIScope *S = LocA->getScope();<br>
+  DILocation *L = LocA->getInlinedAt();<br>
+  while (S) {<br>
+    Locations.insert(std::make_pair(S, L));<br>
+    S = S->getScope().resolve();<br>
+    if (!S && L) {<br>
+      S = L->getScope();<br>
+      L = L->getInlinedAt();<br>
+    }<br>
+  }<br>
   const DILocation *Result = LocB;<br>
-  for (DILocation *L = LocB->getInlinedAt(); L; L = L->getInlinedAt()) {<br>
-    Result = L;<br>
-    if (InlinedLocationsA.count(L))<br>
+  S = LocB->getScope();<br>
+  L = LocB->getInlinedAt();<br>
+  while (S) {<br>
+    if (Locations.count(std::make_pair(S, L)))<br>
       break;<br>
+    S = S->getScope().resolve();<br>
+    if (!S && L) {<br>
+      S = L->getScope();<br>
+      L = L->getInlinedAt();<br>
+    }<br>
   }<br>
-  return DILocation::get(Result->getContext(), 0, 0, Result->getScope(),<br>
-                         Result->getInlinedAt());<br>
+  return DILocation::get(Result->getContext(), 0, 0, S, L);<br>
 }<br>
<br>
 DINode::DIFlags DINode::getFlag(StringRef Flag) {<br>
<br>
Modified: llvm/trunk/test/DebugInfo/COFF/local-variables.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/local-variables.ll?rev=340583&r1=340582&r2=340583&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/local-variables.ll?rev=340583&r1=340582&r2=340583&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/DebugInfo/COFF/local-variables.ll (original)<br>
+++ llvm/trunk/test/DebugInfo/COFF/local-variables.ll Thu Aug 23 15:35:58 2018<br>
@@ -60,7 +60,7 @@<br>
 ; ASM:         leaq    36(%rsp), %rcx<br>
 ; ASM: [[else_end:\.Ltmp.*]]:<br>
 ; ASM: .LBB0_3:                                # %if.end<br>
-; ASM:         .cv_loc 0 1 17 1                # t.cpp:17:1<br>
+; ASM:         .cv_loc 0 1 0 0                # t.cpp:0:0<br>
 ; ASM:         callq   capture<br>
 ; ASM:         nop<br>
 ; ASM:         addq    $56, %rsp<br>
<br>
Added: llvm/trunk/test/DebugInfo/X86/merge_inlined_loc.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/merge_inlined_loc.ll?rev=340583&view=auto" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/merge_inlined_loc.ll?rev=340583&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/test/DebugInfo/X86/merge_inlined_loc.ll (added)<br>
+++ llvm/trunk/test/DebugInfo/X86/merge_inlined_loc.ll Thu Aug 23 15:35:58 2018<br>
@@ -0,0 +1,100 @@<br>
+; RUN: llc %s -mtriple=x86_64-unknown-unknown -o - | FileCheck %s<br>
+<br>
+; Generated with "clang -g -c -emit-llvm -S -O3"<br>
+<br>
+; This will test several features of merging debug locations. Importantly,<br>
+; locations with the same source line but different scopes should be merged to<br>
+; a line zero location at the nearest common scope and inlining. The location<br>
+; of the single call to "common" (the two calls are collapsed together by<br>
+; BranchFolding) should be attributed to line zero inside the wrapper2 inlined<br>
+; scope within f1.<br>
+<br>
+; void common();<br>
+; inline void wrapper() { common(); }<br>
+; extern bool b;<br>
+; void sink();<br>
+; inline void wrapper2() {<br>
+;   if (b) {<br>
+;     sink();<br>
+;     wrapper();<br>
+;   } else<br>
+;     wrapper();<br>
+; }<br>
+; void f1() { wrapper2(); }<br>
+<br>
+; Ensure there is only one inlined_subroutine (for wrapper2, none for wrapper)<br>
+; & that its address range includes the call to 'common'.<br>
+<br>
+; CHECK: jmp _Z6commonv<br>
+; CHECK-NEXT: [[LABEL:.*]]:<br>
+<br>
+; CHECK: .section .debug_info<br>
+; CHECK: DW_TAG_subprogram<br>
+; CHECK: DW_TAG_subprogram<br>
+; CHECK-NOT: {{DW_TAG\|End Of Children}}<br>
+; CHECK:   DW_TAG_inlined_subroutine<br>
+; CHECK-NOT: {{DW_TAG\|End Of Children}}<br>
+; CHECK:     [[LABEL]]-{{.*}} DW_AT_high_pc<br>
+; CHECK-NOT: DW_TAG<br>
+<br>
+<br>
+<br>
+@b = external dso_local local_unnamed_addr global i8, align 1<br>
+<br>
+; Function Attrs: uwtable<br>
+define dso_local void @_Z2f1v() local_unnamed_addr !dbg !7 {<br>
+entry:<br>
+  %0 = load i8, i8* @b, align 1, !dbg !10, !tbaa !14, !range !18<br>
+  %tobool.i = icmp eq i8 %0, 0, !dbg !10<br>
+  br i1 %tobool.i, label %if.else.i, label %if.then.i, !dbg !19<br>
+<br>
+if.then.i:                                        ; preds = %entry<br>
+  tail call void @_Z4sinkv(), !dbg !20<br>
+  tail call void @_Z6commonv(), !dbg !22<br>
+  br label %_Z8wrapper2v.exit, !dbg !25<br>
+<br>
+if.else.i:                                        ; preds = %entry<br>
+  tail call void @_Z6commonv(), !dbg !26<br>
+  br label %_Z8wrapper2v.exit<br>
+<br>
+_Z8wrapper2v.exit:                                ; preds = %if.then.i, %if.else.i<br>
+  ret void, !dbg !28<br>
+}<br>
+<br>
+declare dso_local void @_Z4sinkv() local_unnamed_addr<br>
+<br>
+declare dso_local void @_Z6commonv() local_unnamed_addr<br>
+<br>
+!<a href="http://llvm.dbg.cu" target="_blank">llvm.dbg.cu</a> = !{!0}<br>
+!llvm.module.flags = !{!3, !4, !5}<br>
+!llvm.ident = !{!6}<br>
+<br>
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 8.0.0 (trunk 340559) (llvm/trunk 340572)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)<br>
+!1 = !DIFile(filename: "merge_loc.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")<br>
+!2 = !{}<br>
+!3 = !{i32 2, !"Dwarf Version", i32 4}<br>
+!4 = !{i32 2, !"Debug Info Version", i32 3}<br>
+!5 = !{i32 1, !"wchar_size", i32 4}<br>
+!6 = !{!"clang version 8.0.0 (trunk 340559) (llvm/trunk 340572)"}<br>
+!7 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", scope: !1, file: !1, line: 12, type: !8, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)<br>
+!8 = !DISubroutineType(types: !9)<br>
+!9 = !{null}<br>
+!10 = !DILocation(line: 6, column: 7, scope: !11, inlinedAt: !13)<br>
+!11 = distinct !DILexicalBlock(scope: !12, file: !1, line: 6, column: 7)<br>
+!12 = distinct !DISubprogram(name: "wrapper2", linkageName: "_Z8wrapper2v", scope: !1, file: !1, line: 5, type: !8, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)<br>
+!13 = distinct !DILocation(line: 13, column: 3, scope: !7)<br>
+!14 = !{!15, !15, i64 0}<br>
+!15 = !{!"bool", !16, i64 0}<br>
+!16 = !{!"omnipotent char", !17, i64 0}<br>
+!17 = !{!"Simple C++ TBAA"}<br>
+!18 = !{i8 0, i8 2}<br>
+!19 = !DILocation(line: 6, column: 7, scope: !12, inlinedAt: !13)<br>
+!20 = !DILocation(line: 7, column: 5, scope: !21, inlinedAt: !13)<br>
+!21 = distinct !DILexicalBlock(scope: !11, file: !1, line: 6, column: 10)<br>
+!22 = !DILocation(line: 2, column: 25, scope: !23, inlinedAt: !24)<br>
+!23 = distinct !DISubprogram(name: "wrapper", linkageName: "_Z7wrapperv", scope: !1, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)<br>
+!24 = distinct !DILocation(line: 8, column: 5, scope: !21, inlinedAt: !13)<br>
+!25 = !DILocation(line: 9, column: 3, scope: !21, inlinedAt: !13)<br>
+!26 = !DILocation(line: 2, column: 25, scope: !23, inlinedAt: !27)<br>
+!27 = distinct !DILocation(line: 10, column: 5, scope: !11, inlinedAt: !13)<br>
+!28 = !DILocation(line: 14, column: 1, scope: !7)<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><u></u><u></u></p>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div></div></div></blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>