<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=us-ascii">
<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;}
/* 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;}
span.EmailStyle17
        {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">Sure.  I see that the very first debug location is explicitly setting line 0.  Is that really what you want?<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"><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""> aprantl@apple.com [mailto:aprantl@apple.com]
<br>
<b>Sent:</b> Friday, December 16, 2016 2:00 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> llvm-commits; Saleem Abdulrasool<br>
<b>Subject:</b> Re: [llvm] r289468 - Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">Hi Paul,<br>
<br>
we were investigating a test suite regression in the Swift compiler (just in case you are curious:
<a href="https://bugs.swift.org/browse/SR-3421">https://bugs.swift.org/browse/SR-3421</a>) that I could bisect down to this commit.<br>
<br>
When compiling the attached IR (which I reduced manually from the full testcase) llc now runs into a situation where it never sets the prologue_end flag for the function main().<br>
<br>
$llc t.ll -o - | grep '\.loc'<br>
        .loc    1 0 0<br>
        .loc    1 14 13<br>
<br>
I assume that this is something we never want to happen. Would you mind taking a look?<br>
<br>
-- adrian<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt"><br>
<br>
> On Dec 12, 2016, at 12:49 PM, Paul Robinson via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> <br>
> Author: probinson<br>
> Date: Mon Dec 12 14:49:11 2016<br>
> New Revision: 289468<br>
> <br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=289468&view=rev">http://llvm.org/viewvc/llvm-project?rev=289468&view=rev</a><br>
> Log:<br>
> Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions.<br>
> <br>
> DWARF specifies that "line 0" really means "no appropriate source<br>
> location" in the line table.  By default, use this for branch targets<br>
> and some other cases that have no specified source location, to<br>
> prevent inheriting unfortunate line numbers from physically preceding<br>
> instructions (which might be from completely unrelated source).<br>
> <br>
> Updated patch allows enabling or suppressing this behavior for all<br>
> unspecified source locations.<br>
> <br>
> Differential Revision: <a href="http://reviews.llvm.org/D24180">http://reviews.llvm.org/D24180</a><br>
> <br>
> Added:<br>
>    llvm/trunk/test/DebugInfo/X86/dwarf-no-source-loc.ll<br>
> Modified:<br>
>    llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp<br>
>    llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.h<br>
>    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
>    llvm/trunk/test/CodeGen/X86/stack-protector.ll<br>
>    llvm/trunk/test/CodeGen/X86/unknown-location.ll<br>
>    llvm/trunk/test/DebugInfo/AArch64/line-header.ll<br>
>    llvm/trunk/test/DebugInfo/MIR/X86/no-cfi-loc.mir<br>
>    llvm/trunk/test/DebugInfo/X86/tail-merge.ll<br>
> <br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp (original)<br>
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp Mon Dec 12 14:49:11 2016<br>
> @@ -200,8 +200,10 @@ void DebugHandlerBase::endInstruction()<br>
>   assert(CurMI != nullptr);<br>
>   // Don't create a new label after DBG_VALUE instructions.<br>
>   // They don't generate code.<br>
> -  if (!CurMI->isDebugValue())<br>
> +  if (!CurMI->isDebugValue()) {<br>
>     PrevLabel = nullptr;<br>
> +    PrevInstBB = CurMI->getParent();<br>
> +  }<br>
> <br>
>   DenseMap<const MachineInstr *, MCSymbol *>::iterator I =<br>
>       LabelsAfterInsn.find(CurMI);<br>
> <br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.h?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.h?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.h (original)<br>
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DebugHandlerBase.h Mon Dec 12 14:49:11 2016<br>
> @@ -38,10 +38,12 @@ protected:<br>
>   MachineModuleInfo *MMI;<br>
> <br>
>   /// Previous instruction's location information. This is used to<br>
> -  /// determine label location to indicate scope boundries in dwarf<br>
> -  /// debug info.<br>
> +  /// determine label location to indicate scope boundaries in debug info.<br>
> +  /// We track the previous instruction's source location (if not line 0),<br>
> +  /// whether it was a label, and its parent BB.<br>
>   DebugLoc PrevInstLoc;<br>
>   MCSymbol *PrevLabel = nullptr;<br>
> +  const MachineBasicBlock *PrevInstBB = nullptr;<br>
> <br>
>   /// This location indicates end of function prologue and beginning of<br>
>   /// function body.<br>
> <br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Dec 12 14:49:11 2016<br>
> @@ -62,11 +62,6 @@ static cl::opt<bool><br>
> DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden,<br>
>                          cl::desc("Disable debug info printing"));<br>
> <br>
> -static cl::opt<bool> UnknownLocations(<br>
> -    "use-unknown-locations", cl::Hidden,<br>
> -    cl::desc("Make an absence of debug location information explicit."),<br>
> -    cl::init(false));<br>
> -<br>
> static cl::opt<bool><br>
> GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden,<br>
>                        cl::desc("Generate GNU-style pubnames and pubtypes"),<br>
> @@ -81,6 +76,13 @@ namespace {<br>
> enum DefaultOnOff { Default, Enable, Disable };<br>
> }<br>
> <br>
> +static cl::opt<DefaultOnOff> UnknownLocations(<br>
> +    "use-unknown-locations", cl::Hidden,<br>
> +    cl::desc("Make an absence of debug location information explicit."),<br>
> +    cl::values(clEnumVal(Default, "At top of block or after label"),<br>
> +               clEnumVal(Enable, "In all cases"), clEnumVal(Disable, "Never")),<br>
> +    cl::init(Default));<br>
> +<br>
> static cl::opt<DefaultOnOff><br>
> DwarfAccelTables("dwarf-accel-tables", cl::Hidden,<br>
>                  cl::desc("Output prototype dwarf accelerator tables."),<br>
> @@ -1010,31 +1012,73 @@ void DwarfDebug::beginInstruction(const<br>
>   if (MI->isDebugValue() || MI->isCFIInstruction())<br>
>     return;<br>
>   const DebugLoc &DL = MI->getDebugLoc();<br>
> -  if (DL == PrevInstLoc)<br>
> +  // When we emit a line-0 record, we don't update PrevInstLoc; so look at<br>
> +  // the last line number actually emitted, to see if it was line 0.<br>
> +  unsigned LastAsmLine =<br>
> +      Asm->OutStreamer->getContext().getCurrentDwarfLoc().getLine();<br>
> +<br>
> +  if (DL == PrevInstLoc) {<br>
> +    // If we have an ongoing unspecified location, nothing to do here.<br>
> +    if (!DL)<br>
> +      return;<br>
> +    // We have an explicit location, same as the previous location.<br>
> +    // But we might be coming back to it after a line 0 record.<br>
> +    if (LastAsmLine == 0 && DL.getLine() != 0) {<br>
> +      // Reinstate the source location but not marked as a statement.<br>
> +      const MDNode *Scope = DL.getScope();<br>
> +      recordSourceLine(DL.getLine(), DL.getCol(), Scope, /*Flags=*/0);<br>
> +    }<br>
>     return;<br>
> +  }<br>
> <br>
>   if (!DL) {<br>
>     // We have an unspecified location, which might want to be line 0.<br>
> -    if (UnknownLocations) {<br>
> -      PrevInstLoc = DL;<br>
> -      recordSourceLine(0, 0, nullptr, 0);<br>
> +    // If we have already emitted a line-0 record, don't repeat it.<br>
> +    if (LastAsmLine == 0)<br>
> +      return;<br>
> +    // If user said Don't Do That, don't do that.<br>
> +    if (UnknownLocations == Disable)<br>
> +      return;<br>
> +    // See if we have a reason to emit a line-0 record now.<br>
> +    // Reasons to emit a line-0 record include:<br>
> +    // - User asked for it (UnknownLocations).<br>
> +    // - Instruction has a label, so it's referenced from somewhere else,<br>
> +    //   possibly debug information; we want it to have a source location.<br>
> +    // - Instruction is at the top of a block; we don't want to inherit the<br>
> +    //   location from the physically previous (maybe unrelated) block.<br>
> +    if (UnknownLocations == Enable || PrevLabel ||<br>
> +        (PrevInstBB && PrevInstBB != MI->getParent())) {<br>
> +      // Preserve the file number, if we can, to save space in the line table.<br>
> +      // Do not update PrevInstLoc, it remembers the last non-0 line.<br>
> +      // FIXME: Also preserve the column number, to save more space?<br>
> +      const MDNode *Scope = PrevInstLoc ? PrevInstLoc.getScope() : nullptr;<br>
> +      recordSourceLine(0, 0, Scope, 0);<br>
>     }<br>
>     return;<br>
>   }<br>
> <br>
> -  // We have a new, explicit location.<br>
> +  // We have an explicit location, different from the previous location.<br>
> +  // Don't repeat a line-0 record, but otherwise emit the new location.<br>
> +  // (The new location might be an explicit line 0, which we do emit.)<br>
> +  if (DL.getLine() == 0 && LastAsmLine == 0)<br>
> +    return;<br>
>   unsigned Flags = 0;<br>
> -  PrevInstLoc = DL;<br>
>   if (DL == PrologEndLoc) {<br>
>     Flags |= DWARF2_FLAG_PROLOGUE_END | DWARF2_FLAG_IS_STMT;<br>
>     PrologEndLoc = DebugLoc();<br>
>   }<br>
> -  if (DL.getLine() !=<br>
> -      Asm->OutStreamer->getContext().getCurrentDwarfLoc().getLine())<br>
> +  // If the line changed, we call that a new statement; unless we went to<br>
> +  // line 0 and came back, in which case it is not a new statement.<br>
> +  unsigned OldLine = PrevInstLoc ? PrevInstLoc.getLine() : LastAsmLine;<br>
> +  if (DL.getLine() && DL.getLine() != OldLine)<br>
>     Flags |= DWARF2_FLAG_IS_STMT;<br>
> <br>
>   const MDNode *Scope = DL.getScope();<br>
>   recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);<br>
> +<br>
> +  // If we're not at line 0, remember this location.<br>
> +  if (DL.getLine())<br>
> +    PrevInstLoc = DL;<br>
> }<br>
> <br>
> static DebugLoc findPrologueEndLoc(const MachineFunction *MF) {<br>
> <br>
> Modified: llvm/trunk/test/CodeGen/X86/stack-protector.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stack-protector.ll?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stack-protector.ll?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/X86/stack-protector.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/X86/stack-protector.ll Mon Dec 12 14:49:11 2016<br>
> @@ -3888,23 +3888,27 @@ entry:<br>
> define void @test32() #1 !dbg !7 {<br>
> entry:<br>
> ; LINUX-I386-LABEL: test32:<br>
> -; LINUX-I386:       .loc 1 0 0 prologue_end<br>
> +; LINUX-I386:       .loc 1 4 2 prologue_end<br>
> +; LINUX-I386:       .loc 1 0 0<br>
> ; LINUX-I386-NEXT:  calll __stack_chk_fail<br>
> <br>
> ; LINUX-X64-LABEL: test32:<br>
> -; LINUX-X64:       .loc 1 0 0 prologue_end<br>
> +; LINUX-X64:       .loc 1 4 2 prologue_end<br>
> +; LINUX-X64:       .loc 1 0 0<br>
> ; LINUX-X64-NEXT:  callq __stack_chk_fail<br>
> <br>
> ; LINUX-KERNEL-X64-LABEL: test32:<br>
> -; LINUX-KERNEL-X64:       .loc 1 0 0 prologue_end<br>
> +; LINUX-KERNEL-X64:       .loc 1 4 2 prologue_end<br>
> +; LINUX-KERNEL-X64:       .loc 1 0 0<br>
> ; LINUX-KERNEL-X64-NEXT:  callq __stack_chk_fail<br>
> <br>
> ; OPENBSD-AMD64-LABEL: test32:<br>
> -; OPENBSD-AMD64:       .loc 1 0 0 prologue_end<br>
> +; OPENBSD-AMD64:       .loc 1 4 2 prologue_end<br>
> +; OPENBSD-AMD64:       .loc 1 0 0<br>
> ; OPENBSD-AMD64-NEXT:  movl<br>
> ; OPENBSD-AMD64-NEXT:  callq __stack_smash_handler<br>
>   %0 = alloca [5 x i8], align 1<br>
> -  ret void<br>
> +  ret void, !dbg !9<br>
> }<br>
> <br>
> declare double @testi_aux()<br>
> @@ -3940,3 +3944,4 @@ attributes #5 = { ssp "stack-protector-b<br>
> !6 = distinct !DISubprogram(name: "__stack_chk_fail", scope: !1, type: !8, unit: !0)<br>
> !7 = distinct !DISubprogram(name: "test32", scope: !1, type: !8, unit: !0)<br>
> !8 = !DISubroutineType(types: !2)<br>
> +!9 = !DILocation(line: 4, column: 2, scope: !7)<br>
> <br>
> Modified: llvm/trunk/test/CodeGen/X86/unknown-location.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/unknown-location.ll?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/unknown-location.ll?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/X86/unknown-location.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/X86/unknown-location.ll Mon Dec 12 14:49:11 2016<br>
> @@ -1,4 +1,4 @@<br>
> -; RUN: llc < %s -asm-verbose=false -mtriple=x86_64-apple-darwin10 -use-unknown-locations | FileCheck %s<br>
> +; RUN: llc < %s -asm-verbose=false -mtriple=x86_64-apple-darwin10 -use-unknown-locations=Enable | FileCheck %s<br>
> <br>
> ; The divide instruction does not have a debug location. CodeGen should<br>
> ; represent this in the debug information. This is done by setting line<br>
> <br>
> Modified: llvm/trunk/test/DebugInfo/AArch64/line-header.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/AArch64/line-header.ll?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/AArch64/line-header.ll?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/AArch64/line-header.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/AArch64/line-header.ll Mon Dec 12 14:49:11 2016<br>
> @@ -3,4 +3,4 @@<br>
> <br>
> ; check line table length is correctly calculated for both big and little endian<br>
> CHECK-LABEL: .debug_line contents:<br>
> -CHECK: total_length: 0x0000003c<br>
> +CHECK: total_length: 0x0000003e<br>
> <br>
> Modified: llvm/trunk/test/DebugInfo/MIR/X86/no-cfi-loc.mir<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/MIR/X86/no-cfi-loc.mir?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/MIR/X86/no-cfi-loc.mir?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/MIR/X86/no-cfi-loc.mir (original)<br>
> +++ llvm/trunk/test/DebugInfo/MIR/X86/no-cfi-loc.mir Mon Dec 12 14:49:11 2016<br>
> @@ -1,6 +1,6 @@<br>
> # Verify that a CFI instruction with no debug location<br>
> # does not result in a line-0 location in the assembler.<br>
> -# RUN: %llc_dwarf -start-after=prologepilog -march=x86-64 -use-unknown-locations %s -o - | FileCheck %s<br>
> +# RUN: %llc_dwarf -start-after=prologepilog -march=x86-64 -use-unknown-locations=Enable %s -o - | FileCheck %s<br>
> #<br>
> # CHECK-NOT: .loc 1 0<br>
> # CHECK:     .cfi_def_cfa_offset<br>
> <br>
> Added: llvm/trunk/test/DebugInfo/X86/dwarf-no-source-loc.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-no-source-loc.ll?rev=289468&view=auto">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-no-source-loc.ll?rev=289468&view=auto</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/X86/dwarf-no-source-loc.ll (added)<br>
> +++ llvm/trunk/test/DebugInfo/X86/dwarf-no-source-loc.ll Mon Dec 12 14:49:11 2016<br>
> @@ -0,0 +1,77 @@<br>
> +; Verify "no source location" directives appear in appropriate places,<br>
> +; but don't appear when we explicitly suppress them.<br>
> +; RUN: llc < %s -o - | FileCheck %s<br>
> +; RUN: llc < %s -o - -use-unknown-locations=Disable | FileCheck %s --check-prefix=DISABLE<br>
> +<br>
> +; Generated from this .cpp targeting linux using -g<br>
> +; and then removed function attributes as clutter.<br>
> +;<br>
> +; void bar(int *);<br>
> +; void baz(int *);<br>
> +; # 5 "no-source-loc.cpp"<br>
> +; void foo(int x) {<br>
> +;   int z;<br>
> +;   if (x)<br>
> +; # 20 "include.h"<br>
> +;     bar(&z);<br>
> +; # 10 "no-source-loc.cpp"<br>
> +;   baz(&z);<br>
> +; }<br>
> +<br>
> +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"<br>
> +target triple = "x86_64-unknown-linux-gnu"<br>
> +<br>
> +; Function Attrs: uwtable<br>
> +define void @_Z3fooi(i32 %x) !dbg !6 {<br>
> +entry:<br>
> +  %x.addr = alloca i32, align 4<br>
> +  %z = alloca i32, align 4<br>
> +  store i32 %x, i32* %x.addr, align 4<br>
> +  %0 = load i32, i32* %x.addr, align 4, !dbg !8<br>
> +  %tobool = icmp ne i32 %0, 0, !dbg !8<br>
> +  br i1 %tobool, label %if.then, label %if.end, !dbg !8<br>
> +<br>
> +if.then:                                          ; preds = %entry<br>
> +  call void @_Z3barPi(i32* %z), !dbg !9<br>
> +  br label %if.end, !dbg !9<br>
> +<br>
> +if.end:                                           ; preds = %if.then, %entry<br>
> +  call void @_Z3bazPi(i32* %z), !dbg !12<br>
> +  ret void, !dbg !14<br>
> +}<br>
> +<br>
> +; CHECK:      .loc 1 7 7<br>
> +; CHECK-NOT:  .loc<br>
> +; CHECK:      .loc 1 0 0 is_stmt 0<br>
> +; CHECK-NOT:  .loc<br>
> +; CHECK:      .loc 2 20 5 is_stmt 1<br>
> +; CHECK:      .LBB0_2:<br>
> +; CHECK-NEXT: .loc 2 0 0 is_stmt 0<br>
> +; CHECK-NOT:  .loc<br>
> +; CHECK:      .loc 1 10 3 is_stmt 1<br>
> +;<br>
> +; DISABLE-NOT: .loc 1 0<br>
> +<br>
> +declare void @_Z3barPi(i32*)<br>
> +<br>
> +declare void @_Z3bazPi(i32*)<br>
> +<br>
> +!llvm.dbg.cu = !{!0}<br>
> +!llvm.module.flags = !{!3, !4}<br>
> +!llvm.ident = !{!5}<br>
> +<br>
> +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0 (trunk 278782)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)<br>
> +!1 = !DIFile(filename: "no-source-loc.cpp", directory: "/tests")<br>
> +!2 = !{}<br>
> +!3 = !{i32 2, !"Dwarf Version", i32 4}<br>
> +!4 = !{i32 2, !"Debug Info Version", i32 3}<br>
> +!5 = !{!"clang version 4.0.0 (trunk 278782)"}<br>
> +!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 5, type: !7, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)<br>
> +!7 = !DISubroutineType(types: !2)<br>
> +!8 = !DILocation(line: 7, column: 7, scope: !6)<br>
> +!9 = !DILocation(line: 20, column: 5, scope: !10)<br>
> +!10 = !DILexicalBlockFile(scope: !6, file: !11, discriminator: 0)<br>
> +!11 = !DIFile(filename: "include.h", directory: "/tests")<br>
> +!12 = !DILocation(line: 10, column: 3, scope: !13)<br>
> +!13 = !DILexicalBlockFile(scope: !6, file: !1, discriminator: 0)<br>
> +!14 = !DILocation(line: 11, column: 1, scope: !13)<br>
> <br>
> Modified: llvm/trunk/test/DebugInfo/X86/tail-merge.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/tail-merge.ll?rev=289468&r1=289467&r2=289468&view=diff">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/tail-merge.ll?rev=289468&r1=289467&r2=289468&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/X86/tail-merge.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/X86/tail-merge.ll Mon Dec 12 14:49:11 2016<br>
> @@ -1,4 +1,4 @@<br>
> -; RUN: llc %s -mtriple=x86_64-unknown-unknown -use-unknown-locations=true -o - | FileCheck %s<br>
> +; RUN: llc %s -mtriple=x86_64-unknown-unknown -use-unknown-locations=Enable -o - | FileCheck %s<br>
> <br>
> ; Generated with "clang -gline-tables-only -c -emit-llvm -o - | opt -sroa -S"<br>
> ; from source:<br>
> <br>
> <br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>