[llvm] r220256 - Fix a bit of confusion about .set and produce more readable assembly.

David Blaikie dblaikie at gmail.com
Mon Oct 20 21:33:46 PDT 2014


On Oct 20, 2014 6:28 PM, "Rafael Espindola" <rafael.espindola at gmail.com>
wrote:
>
> Author: rafael
> Date: Mon Oct 20 20:17:30 2014
> New Revision: 220256
>
> URL: http://llvm.org/viewvc/llvm-project?rev=220256&view=rev
> Log:
> Fix a bit of confusion about .set and produce more readable assembly.
>
> Every target we support has support for assembly that looks like
>
> a = b - c
> .long a
>
> What is special about MachO is that the above combination suppresses the
> production of a relocation.
>
> With this change we avoid producing the intermediary labels when they
don't
> add any value.

Yay. Should make a few (admittedly sub optimal) tests more stable in the
presence of additions/removals of these expressions.

>
> Modified:
>     llvm/trunk/include/llvm/MC/MCAsmInfo.h
>     llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
>     llvm/trunk/lib/MC/MCAsmInfo.cpp
>     llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
>     llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
>     llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp
>     llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
>     llvm/trunk/test/CodeGen/AArch64/jump-table.ll
>     llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
>     llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll
>     llvm/trunk/test/CodeGen/XCore/exception.ll
>     llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll
>     llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll
>     llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll
>     llvm/trunk/test/DebugInfo/X86/pr19307.ll
>
> Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
> +++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Mon Oct 20 20:17:30 2014
> @@ -223,8 +223,12 @@ protected:
>    /// This is the directive used to declare a global entity.  Defaults
to NULL.
>    const char *GlobalDirective;
>
> -  /// True if the assembler supports the .set directive.  Defaults to
true.
> -  bool HasSetDirective;
> +  /// True if the expression
> +  ///   .long f - g
> +  /// uses an relocation but it can be supressed by writting
> +  ///   a = f - g
> +  ///   .long a
> +  bool SetDirectiveSuppressesReloc;
>
>    /// False if the assembler requires that we use
>    /// \code
> @@ -442,7 +446,9 @@ public:
>    bool getAlignmentIsInBytes() const { return AlignmentIsInBytes; }
>    unsigned getTextAlignFillValue() const { return TextAlignFillValue; }
>    const char *getGlobalDirective() const { return GlobalDirective; }
> -  bool hasSetDirective() const { return HasSetDirective; }
> +  bool doesSetDirectiveSuppressesReloc() const {
> +    return SetDirectiveSuppressesReloc;
> +  }
>    bool hasAggressiveSymbolFolding() const { return
HasAggressiveSymbolFolding; }
>    bool getCOMMDirectiveAlignmentIsInBytes() const {
>      return COMMDirectiveAlignmentIsInBytes;
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Oct 20 20:17:30
2014
> @@ -962,24 +962,21 @@ bool AsmPrinter::doFinalization(Module &
>      }
>    }
>
> -  if (MAI->hasSetDirective()) {
> -    OutStreamer.AddBlankLine();
> -    for (const auto &Alias : M.aliases()) {
> -      MCSymbol *Name = getSymbol(&Alias);
> -
> -      if (Alias.hasExternalLinkage() || !MAI->getWeakRefDirective())
> -        OutStreamer.EmitSymbolAttribute(Name, MCSA_Global);
> -      else if (Alias.hasWeakLinkage() || Alias.hasLinkOnceLinkage())
> -        OutStreamer.EmitSymbolAttribute(Name, MCSA_WeakReference);
> -      else
> -        assert(Alias.hasLocalLinkage() && "Invalid alias linkage");
> +  OutStreamer.AddBlankLine();
> +  for (const auto &Alias : M.aliases()) {
> +    MCSymbol *Name = getSymbol(&Alias);
> +
> +    if (Alias.hasExternalLinkage() || !MAI->getWeakRefDirective())
> +      OutStreamer.EmitSymbolAttribute(Name, MCSA_Global);
> +    else if (Alias.hasWeakLinkage() || Alias.hasLinkOnceLinkage())
> +      OutStreamer.EmitSymbolAttribute(Name, MCSA_WeakReference);
> +    else
> +      assert(Alias.hasLocalLinkage() && "Invalid alias linkage");
>
> -      EmitVisibility(Name, Alias.getVisibility());
> +    EmitVisibility(Name, Alias.getVisibility());
>
> -      // Emit the directives as assignments aka .set:
> -      OutStreamer.EmitAssignment(Name,
> -                                 lowerConstant(Alias.getAliasee(),
*this));
> -    }
> +    // Emit the directives as assignments aka .set:
> +    OutStreamer.EmitAssignment(Name, lowerConstant(Alias.getAliasee(),
*this));
>    }
>
>    GCModuleInfo *MI = getAnalysisIfAvailable<GCModuleInfo>();
> @@ -1163,11 +1160,10 @@ void AsmPrinter::EmitJumpTableInfo() {
>      // If this jump table was deleted, ignore it.
>      if (JTBBs.empty()) continue;
>
> -    // For the EK_LabelDifference32 entry, if the target supports .set,
emit a
> -    // .set directive for each unique entry.  This reduces the number of
> -    // relocations the assembler will generate for the jump table.
> +    // For the EK_LabelDifference32 entry, if using .set avoids a
relocation,
> +    /// emit a .set directive for each unique entry.
>      if (MJTI->getEntryKind() ==
MachineJumpTableInfo::EK_LabelDifference32 &&
> -        MAI->hasSetDirective()) {
> +        MAI->doesSetDirectiveSuppressesReloc()) {
>        SmallPtrSet<const MachineBasicBlock*, 16> EmittedSets;
>        const TargetLowering *TLI =
TM.getSubtargetImpl()->getTargetLowering();
>        const MCExpr *Base =
TLI->getPICJumpTableRelocBaseExpr(MF,JTI,OutContext);
> @@ -1240,24 +1236,18 @@ void AsmPrinter::EmitJumpTableEntry(cons
>    }
>
>    case MachineJumpTableInfo::EK_LabelDifference32: {
> -    // EK_LabelDifference32 - Each entry is the address of the block
minus
> -    // the address of the jump table.  This is used for PIC jump tables
where
> -    // gprel32 is not supported.  e.g.:
> +    // Each entry is the address of the block minus the address of the
jump
> +    // table. This is used for PIC jump tables where gprel32 is not
supported.
> +    // e.g.:
>      //      .word LBB123 - LJTI1_2
> -    // If the .set directive is supported, this is emitted as:
> +    // If the .set directive avoids relocations, this is emitted as:
>      //      .set L4_5_set_123, LBB123 - LJTI1_2
>      //      .word L4_5_set_123
> -
> -    // If we have emitted set directives for the jump table entries,
print
> -    // them rather than the entries themselves.  If we're emitting PIC,
then
> -    // emit the table entries as differences between two text section
labels.
> -    if (MAI->hasSetDirective()) {
> -      // If we used .set, reference the .set's symbol.
> +    if (MAI->doesSetDirectiveSuppressesReloc()) {
>        Value = MCSymbolRefExpr::Create(GetJTSetSymbol(UID,
MBB->getNumber()),
>                                        OutContext);
>        break;
>      }
> -    // Otherwise, use the difference as the jump table entry.
>      Value = MCSymbolRefExpr::Create(MBB->getSymbol(), OutContext);
>      const MCExpr *JTI = MCSymbolRefExpr::Create(GetJTISymbol(UID),
OutContext);
>      Value = MCBinaryExpr::CreateSub(Value, JTI, OutContext);
> @@ -1441,9 +1431,9 @@ void AsmPrinter::EmitInt32(int Value) co
>    OutStreamer.EmitIntValue(Value, 4);
>  }
>
> -/// EmitLabelDifference - Emit something like ".long Hi-Lo" where the
size
> -/// in bytes of the directive is specified by Size and Hi/Lo specify the
> -/// labels.  This implicitly uses .set if it is available.
> +/// Emit something like ".long Hi-Lo" where the size in bytes of the
directive
> +/// is specified by Size and Hi/Lo specify the labels. This implicitly
uses
> +/// .set if it avoids relocations.
>  void AsmPrinter::EmitLabelDifference(const MCSymbol *Hi, const MCSymbol
*Lo,
>                                       unsigned Size) const {
>    // Get the Hi-Lo expression.
> @@ -1452,7 +1442,7 @@ void AsmPrinter::EmitLabelDifference(con
>                              MCSymbolRefExpr::Create(Lo, OutContext),
>                              OutContext);
>
> -  if (!MAI->hasSetDirective()) {
> +  if (!MAI->doesSetDirectiveSuppressesReloc()) {
>      OutStreamer.EmitValue(Diff, Size);
>      return;
>    }
>
> Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/MC/MCAsmInfo.cpp Mon Oct 20 20:17:30 2014
> @@ -64,7 +64,7 @@ MCAsmInfo::MCAsmInfo() {
>    GPRel64Directive = nullptr;
>    GPRel32Directive = nullptr;
>    GlobalDirective = "\t.globl\t";
> -  HasSetDirective = true;
> +  SetDirectiveSuppressesReloc = false;
>    HasAggressiveSymbolFolding = true;
>    COMMDirectiveAlignmentIsInBytes = true;
>    LCOMMDirectiveAlignmentType = LCOMM::NoAlignment;
>
> Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
> +++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Mon Oct 20 20:17:30 2014
> @@ -60,4 +60,5 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
>    DwarfUsesRelocationsAcrossSections = false;
>
>    UseIntegratedAssembler = true;
> +  SetDirectiveSuppressesReloc = true;
>  }
>
> Modified: llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp Mon Oct
20 20:17:30 2014
> @@ -33,8 +33,6 @@ NVPTXMCAsmInfo::NVPTXMCAsmInfo(StringRef
>
>    CommentString = "//";
>
> -  HasSetDirective = false;
> -
>    HasSingleParameterDotFile = false;
>
>    InlineAsmStart = " inline asm";
>
> Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp Mon Oct
20 20:17:30 2014
> @@ -35,7 +35,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(StringR
>
>    //===--- Global Variable Emission Directives
--------------------------===//
>    GlobalDirective = ".global";
> -  HasSetDirective = false;
>    HasAggressiveSymbolFolding = true;
>    COMMDirectiveAlignmentIsInBytes = false;
>    HasDotTypeDotSizeDirective = false;
>
> Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Mon Oct 20 20:17:30 2014
> @@ -264,7 +264,8 @@ MCOperand X86MCInstLower::LowerSymbolOpe
>      Expr = MCBinaryExpr::CreateSub(Expr,
>
 MCSymbolRefExpr::Create(MF.getPICBaseSymbol(), Ctx),
>                                     Ctx);
> -    if (MO.isJTI() && MAI.hasSetDirective()) {
> +    if (MO.isJTI()) {
> +      assert(MAI.doesSetDirectiveSuppressesReloc());
>        // If .set directive is supported, use it to reduce the number of
>        // relocations the assembler will generate for differences between
>        // local labels. This is only safe when the symbols are in the same
>
> Modified: llvm/trunk/test/CodeGen/AArch64/jump-table.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/jump-table.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/CodeGen/AArch64/jump-table.ll (original)
> +++ llvm/trunk/test/CodeGen/AArch64/jump-table.ll Mon Oct 20 20:17:30 2014
> @@ -56,15 +56,11 @@ lbl4:
>  ; CHECK-NEXT: .xword
>
>  ; CHECK-PIC-NOT: .data_region
> -; CHECK-PIC: .L[[VAR1:.*]] = .LBB{{.*}}-.LJTI0_0
> -; CHECK-PIC-NEXT: .L[[VAR2:.*]] = .LBB{{.*}}-.LJTI0_0
> -; CHECK-PIC-NEXT: .L[[VAR3:.*]] = .LBB{{.*}}-.LJTI0_0
> -; CHECK-PIC-NEXT: .L[[VAR4:.*]] = .LBB{{.*}}-.LJTI0_0
> -; CHECK-PIC-NEXT: .L[[VAR5:.*]] = .LBB{{.*}}-.LJTI0_0
> -; CHECK-PIC-NEXT: .LJTI0_0:
> -; CHECK-PIC-NEXT: .word .L[[VAR1]]
> -; CHECK-PIC-NEXT: .word .L[[VAR2]]
> -; CHECK-PIC-NEXT: .word .L[[VAR3]]
> -; CHECK-PIC-NEXT: .word .L[[VAR4]]
> -; CHECK-PIC-NEXT: .word .L[[VAR5]]
> +; CHECK-PIC-NOT: .LJTI0_0
> +; CHECK-PIC: .LJTI0_0:
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0
>  ; CHECK-PIC-NOT: .end_data_region
>
> Modified: llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll Mon Oct 20
20:17:30 2014
> @@ -2,8 +2,7 @@
>  ; RUN: llc -mtriple=x86_64-pc-linux -O2 -regalloc=basic < %s | FileCheck
%s
>  ; Test to check .debug_loc support. This test case emits many debug_loc
entries.
>
> -; CHECK: Loc expr size
> -; CHECK-NEXT: .short
> +; CHECK: .short {{.*}} # Loc expr size
>  ; CHECK-NEXT: .Ltmp
>  ; CHECK-NEXT: DW_OP_reg
>
>
> Modified: llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll Mon Oct 20 20:17:30
2014
> @@ -38,10 +38,8 @@ threw:
>  ; CHECK-NEXT: .byte 3
>  ; CHECK-NEXT: .byte 13
>  ; Verify that the unwind data covers the entire patchpoint region:
> -; CHECK-NEXT: [[RANGE_OFFSET:.L[^ ]*]] = .Ltmp0-[[FUNC_BEGIN]]
> -; CHECK-NEXT: .long [[RANGE_OFFSET]]
> -; CHECK-NEXT: [[RANGE_LENGTH:.L[^ ]*]] = [[PP_END]]-.Ltmp0
> -; CHECK-NEXT: .long [[RANGE_LENGTH]]
> +; CHECK-NEXT: .long .Ltmp0-[[FUNC_BEGIN]]
> +; CHECK-NEXT: .long [[PP_END]]-.Ltmp0
>
>
>  ; Verify that the stackmap section got emitted:
>
> Modified: llvm/trunk/test/CodeGen/XCore/exception.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/exception.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/CodeGen/XCore/exception.ll (original)
> +++ llvm/trunk/test/CodeGen/XCore/exception.ll Mon Oct 20 20:17:30 2014
> @@ -107,17 +107,12 @@ Exit:
>  ; CHECK: .asciiz
>  ; CHECK: .byte  3
>  ; CHECK: .byte  26
> -; CHECK: [[SET0:.L[a-zA-Z0-9_]+]] = [[PRE_G]]-[[START]]
> -; CHECK: .long [[SET0]]
> -; CHECK: [[SET1:.L[a-zA-Z0-9_]+]] = [[POST_G]]-[[PRE_G]]
> -; CHECK: .long [[SET1]]
> -; CHECK: [[SET2:.L[a-zA-Z0-9_]+]] = [[LANDING]]-[[START]]
> -; CHECK: .long [[SET2]]
> +; CHECK: .long [[PRE_G]]-[[START]]
> +; CHECK: .long [[POST_G]]-[[PRE_G]]
> +; CHECK: .long [[LANDING]]-[[START]]
>  ; CHECK: .byte 3
> -; CHECK: [[SET3:.L[a-zA-Z0-9_]+]] = [[POST_G]]-[[START]]
> -; CHECK: .long [[SET3]]
> -; CHECK: [[SET4:.L[a-zA-Z0-9_]+]] = [[END]]-[[POST_G]]
> -; CHECK: .long [[SET4]]
> +; CHECK: .long [[POST_G]]-[[START]]
> +; CHECK: .long [[END]]-[[POST_G]]
>  ; CHECK: .long 0
>  ; CHECK: .byte 0
>  ; CHECK: .byte 1
>
> Modified: llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll Mon Oct 20 20:17:30
2014
> @@ -22,17 +22,13 @@
>  ; We expect two location ranges for the variable.
>
>  ; First, it is stored in %rdx:
> -; CHECK:      .Lset{{[0-9]+}} = .Lfunc_begin0-.Lfunc_begin0
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}
> -; CHECK-NEXT: .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}
> +; CHECK:      .quad .Lfunc_begin0-.Lfunc_begin0
> +; CHECK-NEXT: .quad [[START_LABEL]]-.Lfunc_begin0
>  ; CHECK: DW_OP_reg5
>
>  ; Then it's addressed via %rsp:
> -; CHECK:      .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}
> -; CHECK-NEXT: .Lset{{[0-9]+}} = .Lfunc_end0-.Lfunc_begin0
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}
> +; CHECK:      .quad [[START_LABEL]]-.Lfunc_begin0
> +; CHECK-NEXT: .Lfunc_end0-.Lfunc_begin0
>  ; CHECK: DW_OP_breg7
>  ; CHECK-NEXT: [[OFFSET]]
>  ; CHECK: DW_OP_deref
>
> Modified: llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll Mon Oct 20 20:17:30
2014
> @@ -15,18 +15,15 @@
>
>  ; <data section> - it should have made one span covering all vars in
this CU.
>  ; CHECK-NEXT: .quad some_data
> -; CHECK-NEXT: [[R1:\.[A-Za-z0-9]*]] = .Ldebug_end1-some_data
> -; CHECK-NEXT: .quad [[R1]]
> +; CHECK-NEXT: .quad .Ldebug_end1-some_data
>
>  ; <text section> - it should have made one span covering all functions
in this CU.
>  ; CHECK-NEXT: .quad .Lfunc_begin0
> -; CHECK-NEXT: [[R2:\.[A-Za-z0-9]*]] = .Ldebug_end2-.Lfunc_begin0
> -; CHECK-NEXT: .quad [[R2]]
> +; CHECK-NEXT: .quad .Ldebug_end2-.Lfunc_begin0
>
>  ; <other sections> - it should have made one span covering all vars in
this CU.
>  ; CHECK-NEXT: .quad some_other
> -; CHECK-NEXT: [[R3:\.[A-Za-z0-9]*]] = .Ldebug_end3-some_other
> -; CHECK-NEXT: .quad [[R3]]
> +; CHECK-NEXT: .quad .Ldebug_end3-some_other
>
>  ; -- finish --
>  ; CHECK-NEXT: # ARange terminator
>
> Modified: llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll Mon Oct 20 20:17:30
2014
> @@ -8,8 +8,7 @@
>  ; CHECK-NEXT: .byte   0                       # Segment Size (in bytes)
>  ; CHECK-NEXT: .zero   4,255
>  ; CHECK-NEXT: .quad   kittens
> -; CHECK-NEXT: .Lset0 = rainbows-kittens
> -; CHECK-NEXT: .quad   .Lset0
> +; CHECK-NEXT: .quad   rainbows-kittens
>  ; CHECK-NEXT: .quad   0                       # ARange terminator
>  ; CHECK-NEXT: .quad   0
>
> @@ -21,8 +20,7 @@
>  ; CHECK-NEXT: .byte   0                       # Segment Size (in bytes)
>  ; CHECK-NEXT: .zero   4,255
>  ; CHECK-NEXT: .quad   rainbows
> -; CHECK-NEXT: .Lset1 = .Ldebug_end0-rainbows
> -; CHECK-NEXT: .quad   .Lset1
> +; CHECK-NEXT: .quad   .Ldebug_end0-rainbows
>  ; CHECK-NEXT: .quad   0                       # ARange terminator
>  ; CHECK-NEXT: .quad   0
>
>
> Modified: llvm/trunk/test/DebugInfo/X86/pr19307.ll
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr19307.ll?rev=220256&r1=220255&r2=220256&view=diff
>
==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/pr19307.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/pr19307.ll Mon Oct 20 20:17:30 2014
> @@ -20,10 +20,8 @@
>  ; Verify that we have proper range in debug_loc section:
>  ; CHECK: .Ldebug_loc{{[0-9]+}}:
>  ; CHECK: DW_OP_breg1
> -; CHECK:      .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}
> -; CHECK-NEXT: .Lset{{[0-9]+}} = .Lfunc_end0-.Lfunc_begin0
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}
> +; CHECK:      .quad [[START_LABEL]]-.Lfunc_begin0
> +; CHECK-NEXT: .quad .Lfunc_end0-.Lfunc_begin0
>  ; CHECK: DW_OP_breg6
>  ; CHECK: DW_OP_deref
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141020/ac326022/attachment.html>


More information about the llvm-commits mailing list