[llvm] 3951245 - NVPTX: Don't insert an extra empty line at the end of the last section.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 15:16:52 PST 2019


Author: David Blaikie
Date: 2019-11-08T15:16:04-08:00
New Revision: 3951245c38ce2bcb4173a99d00278d704fcdeac1

URL: https://github.com/llvm/llvm-project/commit/3951245c38ce2bcb4173a99d00278d704fcdeac1
DIFF: https://github.com/llvm/llvm-project/commit/3951245c38ce2bcb4173a99d00278d704fcdeac1.diff

LOG: NVPTX: Don't insert an extra empty line at the end of the last section.

This was arbitrarily appearing in only the last section emitted - which
made tests more sensitive than they needed to be (removing the last
section - like the macinfo section change that's coming after this)
would, surprisingly, move the blank line to the previous section.

Added: 
    

Modified: 
    llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    llvm/test/DebugInfo/NVPTX/cu-range-hole.ll
    llvm/test/DebugInfo/NVPTX/debug-addr-class.ll
    llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
    llvm/test/DebugInfo/NVPTX/debug-info.ll
    llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 4cd30319aabc..8a4b4599f92e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1490,8 +1490,6 @@ bool AsmPrinter::doFinalization(Module &M) {
     }
   }
 
-  OutStreamer->AddBlankLine();
-
   // Print aliases in topological order, that is, for each alias a = b,
   // b must be printed before a.
   // This is because on some targets (e.g. PowerPC) linker expects aliases in

diff  --git a/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll b/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll
index 67dca931ca75..6849ffdc1e43 100644
--- a/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll
+++ b/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll
@@ -271,7 +271,6 @@ entry:
 ; CHECK-NEXT: }
 ; CHECK-NEXT: .section .debug_macinfo
 ; CHECK-NEXT: {
-; CHECK-EMPTY:
 ; CHECK-NEXT: }
 
 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }

diff  --git a/llvm/test/DebugInfo/NVPTX/debug-addr-class.ll b/llvm/test/DebugInfo/NVPTX/debug-addr-class.ll
index 2107e1cdc121..50bdc2af1646 100644
--- a/llvm/test/DebugInfo/NVPTX/debug-addr-class.ll
+++ b/llvm/test/DebugInfo/NVPTX/debug-addr-class.ll
@@ -333,6 +333,5 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata)
 ; CHECK-NEXT: }
 ; CHECK-NEXT: .section .debug_macinfo
 ; CHECK-NEXT: {
-; CHECK-EMPTY:
 ; CHECK-NEXT: }
 

diff  --git a/llvm/test/DebugInfo/NVPTX/debug-file-loc.ll b/llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
index b5fae18fbf7a..124aaa097b46 100644
--- a/llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
+++ b/llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
@@ -88,7 +88,6 @@ bb:
 ; CHECK-NEXT: }
 ; CHECK-NEXT: .section .debug_macinfo
 ; CHECK-NEXT: {
-; CHECK-EMPTY:
 ; CHECK-NEXT: }
 
 !llvm.dbg.cu = !{!0}

diff  --git a/llvm/test/DebugInfo/NVPTX/debug-info.ll b/llvm/test/DebugInfo/NVPTX/debug-info.ll
index 00f96cfa8cf1..85a73e5d1976 100644
--- a/llvm/test/DebugInfo/NVPTX/debug-info.ll
+++ b/llvm/test/DebugInfo/NVPTX/debug-info.ll
@@ -8403,7 +8403,6 @@ if.end:                                           ; preds = %if.then, %entry
 ; CHECK-NEXT: }
 ; CHECK-NEXT: .section .debug_macinfo
 ; CHECK-NEXT: {
-; CHECK-EMPTY:
 ; CHECK-NEXT: }
 
 ; Function Attrs: nounwind readnone

diff  --git a/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll b/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
index 6ee63fff7e11..cb18ffe64aff 100644
--- a/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
+++ b/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
@@ -472,5 +472,4 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
 ; CHECK-NEXT: }
 ; CHECK-NEXT: .section .debug_macinfo
 ; CHECK-NEXT: {
-; CHECK-EMPTY:
 ; CHECK-NEXT: }


        


More information about the llvm-commits mailing list