[llvm] r350052 - Revert rL350048 and rL350050
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 24 02:30:04 PST 2018
Author: mkazantsev
Date: Mon Dec 24 02:30:04 2018
New Revision: 350052
URL: http://llvm.org/viewvc/llvm-project?rev=350052&view=rev
Log:
Revert rL350048 and rL350050
These patches have broken almost all buildbots on test
DebugInfo/X86/addr_comments.ll. Reverting to green.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.h
llvm/trunk/test/DebugInfo/X86/addr_comments.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.cpp?rev=350052&r1=350051&r2=350052&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.cpp Mon Dec 24 02:30:04 2018
@@ -24,23 +24,21 @@ unsigned AddressPool::getIndex(const MCS
return IterBool.first->second.Number;
}
-MCSymbol *AddressPool::emitHeader(AsmPrinter &Asm, MCSection *Section) {
+
+void AddressPool::emitHeader(AsmPrinter &Asm, MCSection *Section) {
static const uint8_t AddrSize = Asm.getDataLayout().getPointerSize();
- StringRef Prefix = "debug_addr_";
- MCSymbol *BeginLabel = Asm.createTempSymbol(Prefix + "start");
- MCSymbol *EndLabel = Asm.createTempSymbol(Prefix + "end");
+ uint64_t Length = sizeof(uint16_t) // version
+ + sizeof(uint8_t) // address_size
+ + sizeof(uint8_t) // segment_selector_size
+ + AddrSize * Pool.size(); // entries
Asm.OutStreamer->AddComment("Length of contribution");
- Asm.EmitLabelDifference(EndLabel, BeginLabel,
- 4); // TODO: Support DWARF64 format.
- Asm.OutStreamer->EmitLabel(BeginLabel);
+ Asm.emitInt32(Length); // TODO: Support DWARF64 format.
Asm.OutStreamer->AddComment("DWARF version number");
Asm.emitInt16(Asm.getDwarfVersion());
Asm.OutStreamer->AddComment("Address size");
Asm.emitInt8(AddrSize);
Asm.OutStreamer->AddComment("Segment selector size");
Asm.emitInt8(0); // TODO: Support non-zero segment_selector_size.
-
- return EndLabel;
}
// Emit addresses into the section given.
@@ -51,10 +49,8 @@ void AddressPool::emit(AsmPrinter &Asm,
// Start the dwarf addr section.
Asm.OutStreamer->SwitchSection(AddrSection);
- MCSymbol *EndLabel = nullptr;
-
if (Asm.getDwarfVersion() >= 5)
- EndLabel = emitHeader(Asm, AddrSection);
+ emitHeader(Asm, AddrSection);
// Define the symbol that marks the start of the contribution.
// It is referenced via DW_AT_addr_base.
@@ -71,7 +67,4 @@ void AddressPool::emit(AsmPrinter &Asm,
for (const MCExpr *Entry : Entries)
Asm.OutStreamer->EmitValue(Entry, Asm.getDataLayout().getPointerSize());
-
- if (EndLabel)
- Asm.OutStreamer->EmitLabel(EndLabel);
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.h?rev=350052&r1=350051&r2=350052&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AddressPool.h Mon Dec 24 02:30:04 2018
@@ -55,7 +55,7 @@ public:
void setLabel(MCSymbol *Sym) { AddressTableBaseSym = Sym; }
private:
- MCSymbol *emitHeader(AsmPrinter &Asm, MCSection *Section);
+ void emitHeader(AsmPrinter &Asm, MCSection *Section);
/// Symbol designates the start of the contribution to the address table.
MCSymbol *AddressTableBaseSym = nullptr;
Modified: llvm/trunk/test/DebugInfo/X86/addr_comments.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/addr_comments.ll?rev=350052&r1=350051&r2=350052&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/addr_comments.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/addr_comments.ll Mon Dec 24 02:30:04 2018
@@ -1,14 +1,12 @@
; RUN: llc %s -mtriple=i386-unknown-linux-gnu -filetype=asm -o - | FileCheck %s
-; CHECK: .section .debug_addr
-; CHECK-NEXT: .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
-; CHECK-NEXT: .Ldebug_addr_startt 0:
-; CHECK-NEXT: .short 5 # DWARF version number
-; CHECK-NEXT: .byte 4 # Address size
-; CHECK-NEXT: .byte 0 # Segment selector size
-; CHECK-NEXT: .Laddr_table_base0:
-; CHECK-NEXT: .long .Lfunc_begin0
-; CHECK-NEXT: .Ldebug_addr_end0:
+; CHECK: .section .debug_addr
+; CHECK: .long 8 # Length of contribution
+; CHECK: .short 5 # DWARF version number
+; CHECK: .byte 4 # Address size
+; CHECK: .byte 0 # Segment selector size
+; CHECK: .Laddr_table_base0:
+; CHECK: .long .Lfunc_begin0
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @foo() #0 !dbg !7 {
More information about the llvm-commits
mailing list