[llvm] r253804 - Have a single way for creating unique value names.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 21 16:16:24 PST 2015


Author: rafael
Date: Sat Nov 21 18:16:24 2015
New Revision: 253804

URL: http://llvm.org/viewvc/llvm-project?rev=253804&view=rev
Log:
Have a single way for creating unique value names.

We had two code paths. One would create names like "foo.1" and the other
names like "foo1".

For globals it is important to use "foo.1" to help C++ name demangling.
For locals there is no strong reason to go one way or the other so I
kept the most common mangling (foo1).

Modified:
    llvm/trunk/include/llvm/IR/ValueSymbolTable.h
    llvm/trunk/lib/IR/ValueSymbolTable.cpp
    llvm/trunk/test/CodeGen/NVPTX/symbol-naming.ll
    llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll
    llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll
    llvm/trunk/test/Linker/override-with-internal-linkage.ll
    llvm/trunk/test/Linker/testlink.ll
    llvm/trunk/test/Transforms/BBVectorize/simple3.ll
    llvm/trunk/test/Transforms/Inline/noalias-cs.ll
    llvm/trunk/test/Transforms/Inline/noalias2.ll
    llvm/trunk/test/Transforms/InstCombine/cast.ll
    llvm/trunk/test/Transforms/InstCombine/shift.ll
    llvm/trunk/test/Transforms/InstCombine/xor.ll
    llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll
    llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll
    llvm/trunk/test/Transforms/LowerSwitch/feature.ll
    llvm/trunk/test/Transforms/PlaceSafepoints/basic.ll
    llvm/trunk/test/Transforms/PlaceSafepoints/call_gc_result.ll
    llvm/trunk/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll
    llvm/trunk/test/Transforms/RewriteStatepointsForGC/relocation.ll
    llvm/trunk/test/Transforms/Util/lowerswitch.ll
    llvm/trunk/test/tools/gold/X86/comdat.ll
    llvm/trunk/test/tools/llvm-split/unnamed.ll

Modified: llvm/trunk/include/llvm/IR/ValueSymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ValueSymbolTable.h?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ValueSymbolTable.h (original)
+++ llvm/trunk/include/llvm/IR/ValueSymbolTable.h Sat Nov 21 18:16:24 2015
@@ -14,6 +14,7 @@
 #ifndef LLVM_IR_VALUESYMBOLTABLE_H
 #define LLVM_IR_VALUESYMBOLTABLE_H
 
+#include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/IR/Value.h"
 #include "llvm/Support/DataTypes.h"
@@ -99,6 +100,8 @@ public:
   /// @name Mutators
   /// @{
 private:
+  ValueName *makeUniqueName(Value *V, SmallString<256> &UniqueName);
+
   /// This method adds the provided value \p N to the symbol table.  The Value
   /// must have a name which is used to place the value in the symbol table.
   /// If the inserted name conflicts, this renames the value.

Modified: llvm/trunk/lib/IR/ValueSymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ValueSymbolTable.cpp?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ValueSymbolTable.cpp (original)
+++ llvm/trunk/lib/IR/ValueSymbolTable.cpp Sat Nov 21 18:16:24 2015
@@ -32,6 +32,24 @@ ValueSymbolTable::~ValueSymbolTable() {
 #endif
 }
 
+ValueName *ValueSymbolTable::makeUniqueName(Value *V,
+                                            SmallString<256> &UniqueName) {
+  unsigned BaseSize = UniqueName.size();
+  while (1) {
+    // Trim any suffix off and append the next number.
+    UniqueName.resize(BaseSize);
+    raw_svector_ostream S(UniqueName);
+    if (isa<GlobalValue>(V))
+      S << ".";
+    S << ++LastUnique;
+
+    // Try insert the vmap entry with this suffix.
+    auto IterBool = vmap.insert(std::make_pair(UniqueName, V));
+    if (IterBool.second)
+      return &*IterBool.first;
+  }
+}
+
 // Insert a value into the symbol table with the specified name...
 //
 void ValueSymbolTable::reinsertValue(Value* V) {
@@ -49,21 +67,8 @@ void ValueSymbolTable::reinsertValue(Val
   // The name is too already used, just free it so we can allocate a new name.
   V->getValueName()->Destroy();
 
-  unsigned BaseSize = UniqueName.size();
-  while (1) {
-    // Trim any suffix off and append the next number.
-    UniqueName.resize(BaseSize);
-    raw_svector_ostream(UniqueName) << "." << ++LastUnique;
-
-    // Try insert the vmap entry with this suffix.
-    auto IterBool = vmap.insert(std::make_pair(UniqueName, V));
-    if (IterBool.second) {
-      // Newly inserted name.  Success!
-      V->setValueName(&*IterBool.first);
-     //DEBUG(dbgs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
-      return;
-    }
-  }
+  ValueName *VN = makeUniqueName(V, UniqueName);
+  V->setValueName(VN);
 }
 
 void ValueSymbolTable::removeValueName(ValueName *V) {
@@ -86,20 +91,7 @@ ValueName *ValueSymbolTable::createValue
   
   // Otherwise, there is a naming conflict.  Rename this value.
   SmallString<256> UniqueName(Name.begin(), Name.end());
-  
-  while (1) {
-    // Trim any suffix off and append the next number.
-    UniqueName.resize(Name.size());
-    raw_svector_ostream(UniqueName) << ++LastUnique;
-    
-    // Try insert the vmap entry with this suffix.
-    auto IterBool = vmap.insert(std::make_pair(UniqueName, V));
-    if (IterBool.second) {
-      // DEBUG(dbgs() << " Inserted value: " << UniqueName << ": " << *V <<
-      //       "\n");
-      return &*IterBool.first;
-    }
-  }
+  return makeUniqueName(V, UniqueName);
 }
 
 

Modified: llvm/trunk/test/CodeGen/NVPTX/symbol-naming.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/symbol-naming.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/symbol-naming.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/symbol-naming.ll Sat Nov 21 18:16:24 2015
@@ -7,10 +7,10 @@
 ; PTX32-NOT: .str
 ; PTX64-NOT: .str
 
-; PTX32-DAG: _$_str1
+; PTX32-DAG: _$_str.1
 ; PTX32-DAG: _$_str
 
-; PTX64-DAG: _$_str1
+; PTX64-DAG: _$_str.1
 ; PTX64-DAG: _$_str
 
 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"

Modified: llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll (original)
+++ llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll Sat Nov 21 18:16:24 2015
@@ -2,9 +2,9 @@
 ; RUN: llvm-as %s -o %t.2.bc
 ; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
 
-; CHECK: @bar = global i32 ()* @foo2
+; CHECK: @bar = global i32 ()* @foo.2
 
-; CHECK:      define internal i32 @foo2() {
+; CHECK:      define internal i32 @foo.2() {
 ; CHECK-NEXT:   ret i32 7
 ; CHECK-NEXT: }
 

Modified: llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll (original)
+++ llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll Sat Nov 21 18:16:24 2015
@@ -2,9 +2,9 @@
 ; RUN: llvm-as  %s -o %t.2.bc
 ; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
 
-; CHECK: @bar = global i32 ()* @foo2
+; CHECK: @bar = global i32 ()* @foo.2
 
-; CHECK:      define internal i32 @foo2() {
+; CHECK:      define internal i32 @foo.2() {
 ; CHECK-NEXT:   ret i32 7
 ; CHECK-NEXT: }
 

Modified: llvm/trunk/test/Linker/override-with-internal-linkage.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/override-with-internal-linkage.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Linker/override-with-internal-linkage.ll (original)
+++ llvm/trunk/test/Linker/override-with-internal-linkage.ll Sat Nov 21 18:16:24 2015
@@ -3,14 +3,14 @@
 
 ; CHECK-LABEL: define i32 @main(
 ; CHECK-NEXT: entry:
-; CHECK-NEXT: call i32 @foo2(
+; CHECK-NEXT: call i32 @foo.2(
 define i32 @main(i32 %argc, i8** %argv) {
 entry:
   %a = call i32 @foo(i32 2)
   ret i32 %a
 }
 
-; CHECK-LABEL: define internal i32 @foo2(
+; CHECK-LABEL: define internal i32 @foo.2(
 ; CHECK-NEXT: entry:
 ; CHECK-NEXT: %add = add nsw i32 %i, %i
 ; CHECK-NEXT: ret i32 %add

Modified: llvm/trunk/test/Linker/testlink.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/testlink.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Linker/testlink.ll (original)
+++ llvm/trunk/test/Linker/testlink.ll Sat Nov 21 18:16:24 2015
@@ -43,7 +43,7 @@
 
 ; This should get renamed since there is a definition that is non-internal in
 ; the other module.
-; CHECK-DAG: @Intern2{{[0-9]+}} = internal constant i32 792
+; CHECK-DAG: @Intern2.{{[0-9]+}} = internal constant i32 792
 @Intern2 = internal constant i32 792
 
 @UseIntern2 = global i32* @Intern2

Modified: llvm/trunk/test/Transforms/BBVectorize/simple3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/BBVectorize/simple3.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/BBVectorize/simple3.ll (original)
+++ llvm/trunk/test/Transforms/BBVectorize/simple3.ll Sat Nov 21 18:16:24 2015
@@ -4,12 +4,12 @@ target datalayout = "e-p:64:64:64-i1:8:8
 ; Basic depth-3 chain
 define double @test1(double %A1, double %A2, double %A3, double %B1, double %B2, double %B3) {
 ; CHECK-LABEL: @test1(
-; CHECK: %X1.v.i1.1.1 = insertelement <3 x double> undef, double %B1, i32 0
-; CHECK: %X1.v.i1.2.2 = insertelement <3 x double> %X1.v.i1.1.1, double %B2, i32 1
-; CHECK: %X1.v.i1 = insertelement <3 x double> %X1.v.i1.2.2, double %B3, i32 2
-; CHECK: %X1.v.i0.1.3 = insertelement <3 x double> undef, double %A1, i32 0
-; CHECK: %X1.v.i0.2.4 = insertelement <3 x double> %X1.v.i0.1.3, double %A2, i32 1
-; CHECK: %X1.v.i0 = insertelement <3 x double> %X1.v.i0.2.4, double %A3, i32 2
+; CHECK: %X1.v.i1.11 = insertelement <3 x double> undef, double %B1, i32 0
+; CHECK: %X1.v.i1.22 = insertelement <3 x double> %X1.v.i1.11, double %B2, i32 1
+; CHECK: %X1.v.i1 = insertelement <3 x double> %X1.v.i1.22, double %B3, i32 2
+; CHECK: %X1.v.i0.13 = insertelement <3 x double> undef, double %A1, i32 0
+; CHECK: %X1.v.i0.24 = insertelement <3 x double> %X1.v.i0.13, double %A2, i32 1
+; CHECK: %X1.v.i0 = insertelement <3 x double> %X1.v.i0.24, double %A3, i32 2
 	%X1 = fsub double %A1, %B1
 	%X2 = fsub double %A2, %B2
 	%X3 = fsub double %A3, %B3
@@ -24,11 +24,11 @@ define double @test1(double %A1, double
 ; CHECK: %Z1 = fadd <3 x double> %Y1, %X1.v.i1
         %R1 = fmul double %Z1, %Z2
 	%R  = fmul double %R1, %Z3
-; CHECK: %Z1.v.r2.10 = extractelement <3 x double> %Z1, i32 2
+; CHECK: %Z1.v.r210 = extractelement <3 x double> %Z1, i32 2
 ; CHECK: %Z1.v.r1 = extractelement <3 x double> %Z1, i32 0
 ; CHECK: %Z1.v.r2 = extractelement <3 x double> %Z1, i32 1
 ; CHECK: %R1 = fmul double %Z1.v.r1, %Z1.v.r2
-; CHECK: %R = fmul double %R1, %Z1.v.r2.10
+; CHECK: %R = fmul double %R1, %Z1.v.r210
 	ret double %R
 ; CHECK: ret double %R
 }

Modified: llvm/trunk/test/Transforms/Inline/noalias-cs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/noalias-cs.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/noalias-cs.ll (original)
+++ llvm/trunk/test/Transforms/Inline/noalias-cs.ll Sat Nov 21 18:16:24 2015
@@ -34,13 +34,13 @@ entry:
 ; CHECK:   %arrayidx.i = getelementptr inbounds float, float* %a, i64 7
 ; CHECK:   store float %1, float* %arrayidx.i, align 4, !noalias !16
 ; CHECK:   %2 = load float, float* %a, align 4, !alias.scope !16, !noalias !17
-; CHECK:   %arrayidx.i.i.1 = getelementptr inbounds float, float* %b, i64 5
-; CHECK:   store float %2, float* %arrayidx.i.i.1, align 4, !alias.scope !21, !noalias !22
-; CHECK:   %arrayidx1.i.i.2 = getelementptr inbounds float, float* %b, i64 8
-; CHECK:   store float %2, float* %arrayidx1.i.i.2, align 4, !alias.scope !23, !noalias !24
+; CHECK:   %arrayidx.i.i1 = getelementptr inbounds float, float* %b, i64 5
+; CHECK:   store float %2, float* %arrayidx.i.i1, align 4, !alias.scope !21, !noalias !22
+; CHECK:   %arrayidx1.i.i2 = getelementptr inbounds float, float* %b, i64 8
+; CHECK:   store float %2, float* %arrayidx1.i.i2, align 4, !alias.scope !23, !noalias !24
 ; CHECK:   %3 = load float, float* %a, align 4, !alias.scope !16
-; CHECK:   %arrayidx.i.3 = getelementptr inbounds float, float* %b, i64 7
-; CHECK:   store float %3, float* %arrayidx.i.3, align 4, !alias.scope !16
+; CHECK:   %arrayidx.i3 = getelementptr inbounds float, float* %b, i64 7
+; CHECK:   store float %3, float* %arrayidx.i3, align 4, !alias.scope !16
 ; CHECK:   ret void
 ; CHECK: }
 

Modified: llvm/trunk/test/Transforms/Inline/noalias2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/noalias2.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/noalias2.ll (original)
+++ llvm/trunk/test/Transforms/Inline/noalias2.ll Sat Nov 21 18:16:24 2015
@@ -61,8 +61,8 @@ entry:
 ; CHECK:   %arrayidx.i = getelementptr inbounds float, float* %a, i64 7
 ; CHECK:   store float %1, float* %arrayidx.i, align 4, !alias.scope !14, !noalias !13
 ; CHECK:   %2 = load float, float* %c, align 4, !noalias !15
-; CHECK:   %arrayidx.i.1 = getelementptr inbounds float, float* %a, i64 6
-; CHECK:   store float %2, float* %arrayidx.i.1, align 4, !alias.scope !19, !noalias !20
+; CHECK:   %arrayidx.i1 = getelementptr inbounds float, float* %a, i64 6
+; CHECK:   store float %2, float* %arrayidx.i1, align 4, !alias.scope !19, !noalias !20
 ; CHECK:   %arrayidx1.i = getelementptr inbounds float, float* %b, i64 8
 ; CHECK:   store float %2, float* %arrayidx1.i, align 4, !alias.scope !20, !noalias !19
 ; CHECK:   %3 = load float, float* %c, align 4

Modified: llvm/trunk/test/Transforms/InstCombine/cast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/cast.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/cast.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/cast.ll Sat Nov 21 18:16:24 2015
@@ -187,8 +187,8 @@ define i32 @test21(i32 %X) {
         %c2 = sext i8 %c1 to i32                ; <i32> [#uses=1]
         %RV = and i32 %c2, 255          ; <i32> [#uses=1]
         ret i32 %RV
-; CHECK: %c2.1 = and i32 %X, 255
-; CHECK: ret i32 %c2.1
+; CHECK: %c21 = and i32 %X, 255
+; CHECK: ret i32 %c21
 }
 
 define i32 @test22(i32 %X) {

Modified: llvm/trunk/test/Transforms/InstCombine/shift.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/shift.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/shift.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/shift.ll Sat Nov 21 18:16:24 2015
@@ -575,7 +575,7 @@ entry:
 ; CHECK: %0 = shl i8 %tmp4, 2
 ; CHECK: %tmp54 = and i8 %0, 16
   %tmp55 = xor i8 %tmp54, %tmp51
-; CHECK: ret i8 %tmp55.1
+; CHECK: ret i8 %tmp551
   ret i8 %tmp55
 }
 
@@ -743,7 +743,7 @@ define i32 @test57(i32 %x) {
   %or = or i32 %shl, 7
   ret i32 %or
 ; CHECK-LABEL: @test57(
-; CHECK: %shl = shl i32 %shr.1, 4
+; CHECK: %shl = shl i32 %shr1, 4
 }
 
 

Modified: llvm/trunk/test/Transforms/InstCombine/xor.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/xor.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/xor.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/xor.ll Sat Nov 21 18:16:24 2015
@@ -63,8 +63,8 @@ define i32 @test7(i32 %A, i32 %B) {
 ; CHECK-LABEL: @test7(
 ; CHECK-NEXT: %A1 = and i32 %A, 7
 ; CHECK-NEXT: %B1 = and i32 %B, 128
-; CHECK-NEXT: %C1.1 = or i32 %A1, %B1
-; CHECK-NEXT: ret i32 %C1.1
+; CHECK-NEXT: %C11 = or i32 %A1, %B1
+; CHECK-NEXT: ret i32 %C11
 	%A1 = and i32 %A, 7		; <i32> [#uses=1]
 	%B1 = and i32 %B, 128		; <i32> [#uses=1]
 	%C1 = xor i32 %A1, %B1		; <i32> [#uses=1]
@@ -96,8 +96,8 @@ define i1 @test9(i8 %A) {
 define i8 @test10(i8 %A) {
 ; CHECK-LABEL: @test10(
 ; CHECK-NEXT: %B = and i8 %A, 3
-; CHECK-NEXT: %C.1 = or i8 %B, 4
-; CHECK-NEXT: ret i8 %C.1
+; CHECK-NEXT: %C1 = or i8 %B, 4
+; CHECK-NEXT: ret i8 %C1
 	%B = and i8 %A, 3		; <i8> [#uses=1]
 	%C = xor i8 %B, 4		; <i8> [#uses=1]
 	ret i8 %C

Modified: llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll (original)
+++ llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll Sat Nov 21 18:16:24 2015
@@ -34,7 +34,7 @@
 ; CHECK-NEXT:   br label %loop_begin.us1
 
 ; CHECK:      loop_begin.us1:                                   ; preds = %loop_begin.backedge.us5, %.split.split.us
-; CHECK-NEXT:   %var_val.us.2 = load i32, i32* %var
+; CHECK-NEXT:   %var_val.us2 = load i32, i32* %var
 ; CHECK-NEXT:   switch i32 2, label %default.us-lcssa.us-lcssa.us [
 ; CHECK-NEXT:     i32 1, label %inc.us4
 ; CHECK-NEXT:     i32 2, label %dec.us3

Modified: llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll (original)
+++ llvm/trunk/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll Sat Nov 21 18:16:24 2015
@@ -65,7 +65,7 @@
 ; CHECK-NEXT:   br label %loop_begin.us1
 
 ; CHECK:      loop_begin.us1:                                   ; preds = %loop_begin.backedge.us6, %.split.split.us
-; CHECK-NEXT:   %var_val.us.2 = load i32, i32* %var
+; CHECK-NEXT:   %var_val.us2 = load i32, i32* %var
 ; CHECK-NEXT:   switch i32 %c, label %second_switch.us3 [
 ; CHECK-NEXT:     i32 1, label %loop_begin.inc_crit_edge.us
 ; CHECK-NEXT:   ]

Modified: llvm/trunk/test/Transforms/LowerSwitch/feature.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerSwitch/feature.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LowerSwitch/feature.ll (original)
+++ llvm/trunk/test/Transforms/LowerSwitch/feature.ll Sat Nov 21 18:16:24 2015
@@ -4,49 +4,49 @@
 ; On output we should got binary comparison tree. Check that all is fine.
 
 ;CHECK:     entry:
-;CHECK-NEXT:  br label %NodeBlock.19
+;CHECK-NEXT:  br label %NodeBlock19
 
-;CHECK:     NodeBlock.19:                                      ; preds = %entry
-;CHECK-NEXT:  %Pivot.20 = icmp slt i32 %tmp158, 10
-;CHECK-NEXT:  br i1 %Pivot.20, label %NodeBlock.5, label %NodeBlock.17
+;CHECK:     NodeBlock19:                                      ; preds = %entry
+;CHECK-NEXT:  %Pivot20 = icmp slt i32 %tmp158, 10
+;CHECK-NEXT:  br i1 %Pivot20, label %NodeBlock5, label %NodeBlock17
 
-;CHECK:     NodeBlock.17:                                      ; preds = %NodeBlock.19
-;CHECK-NEXT:  %Pivot.18 = icmp slt i32 %tmp158, 13
-;CHECK-NEXT:  br i1 %Pivot.18, label %NodeBlock.9, label %NodeBlock.15
+;CHECK:     NodeBlock17:                                      ; preds = %NodeBlock19
+;CHECK-NEXT:  %Pivot18 = icmp slt i32 %tmp158, 13
+;CHECK-NEXT:  br i1 %Pivot18, label %NodeBlock9, label %NodeBlock15
 
-;CHECK:     NodeBlock.15:                                      ; preds = %NodeBlock.17
-;CHECK-NEXT:  %Pivot.16 = icmp slt i32 %tmp158, 14
-;CHECK-NEXT:  br i1 %Pivot.16, label %bb330, label %NodeBlock.13
+;CHECK:     NodeBlock15:                                      ; preds = %NodeBlock17
+;CHECK-NEXT:  %Pivot16 = icmp slt i32 %tmp158, 14
+;CHECK-NEXT:  br i1 %Pivot16, label %bb330, label %NodeBlock13
 
-;CHECK:     NodeBlock.13:                                      ; preds = %NodeBlock.15
-;CHECK-NEXT:  %Pivot.14 = icmp slt i32 %tmp158, 15
-;CHECK-NEXT:  br i1 %Pivot.14, label %bb332, label %LeafBlock.11
+;CHECK:     NodeBlock13:                                      ; preds = %NodeBlock15
+;CHECK-NEXT:  %Pivot14 = icmp slt i32 %tmp158, 15
+;CHECK-NEXT:  br i1 %Pivot14, label %bb332, label %LeafBlock11
 
-;CHECK:     LeafBlock.11:                                      ; preds = %NodeBlock.13
+;CHECK:     LeafBlock11:                                      ; preds = %NodeBlock13
 ;CHECK-NEXT:  %SwitchLeaf12 = icmp eq i32 %tmp158, 15
 ;CHECK-NEXT:  br i1 %SwitchLeaf12, label %bb334, label %NewDefault
 
-;CHECK:     NodeBlock.9:                                       ; preds = %NodeBlock.17
-;CHECK-NEXT:  %Pivot.10 = icmp slt i32 %tmp158, 11
-;CHECK-NEXT:  br i1 %Pivot.10, label %bb324, label %NodeBlock.7
-
-;CHECK:     NodeBlock.7:                                       ; preds = %NodeBlock.9
-;CHECK-NEXT:  %Pivot.8 = icmp slt i32 %tmp158, 12
-;CHECK-NEXT:  br i1 %Pivot.8, label %bb326, label %bb328
-
-;CHECK:     NodeBlock.5:                                       ; preds = %NodeBlock.19
-;CHECK-NEXT:  %Pivot.6 = icmp slt i32 %tmp158, 7
-;CHECK-NEXT:  br i1 %Pivot.6, label %NodeBlock, label %NodeBlock.3
-
-;CHECK:     NodeBlock.3:                                       ; preds = %NodeBlock.5
-;CHECK-NEXT:  %Pivot.4 = icmp slt i32 %tmp158, 8
-;CHECK-NEXT:  br i1 %Pivot.4, label %bb, label %NodeBlock.1
-
-;CHECK:     NodeBlock.1:                                       ; preds = %NodeBlock.3
-;CHECK-NEXT:  %Pivot.2 = icmp slt i32 %tmp158, 9
-;CHECK-NEXT:  br i1 %Pivot.2, label %bb338, label %bb322
+;CHECK:     NodeBlock9:                                       ; preds = %NodeBlock17
+;CHECK-NEXT:  %Pivot10 = icmp slt i32 %tmp158, 11
+;CHECK-NEXT:  br i1 %Pivot10, label %bb324, label %NodeBlock7
+
+;CHECK:     NodeBlock7:                                       ; preds = %NodeBlock9
+;CHECK-NEXT:  %Pivot8 = icmp slt i32 %tmp158, 12
+;CHECK-NEXT:  br i1 %Pivot8, label %bb326, label %bb328
+
+;CHECK:     NodeBlock5:                                       ; preds = %NodeBlock19
+;CHECK-NEXT:  %Pivot6 = icmp slt i32 %tmp158, 7
+;CHECK-NEXT:  br i1 %Pivot6, label %NodeBlock, label %NodeBlock3
+
+;CHECK:     NodeBlock3:                                       ; preds = %NodeBlock5
+;CHECK-NEXT:  %Pivot4 = icmp slt i32 %tmp158, 8
+;CHECK-NEXT:  br i1 %Pivot4, label %bb, label %NodeBlock1
+
+;CHECK:     NodeBlock1:                                       ; preds = %NodeBlock3
+;CHECK-NEXT:  %Pivot2 = icmp slt i32 %tmp158, 9
+;CHECK-NEXT:  br i1 %Pivot2, label %bb338, label %bb322
 
-;CHECK:     NodeBlock:                                        ; preds = %NodeBlock.5
+;CHECK:     NodeBlock:                                        ; preds = %NodeBlock5
 ;CHECK-NEXT:  %Pivot = icmp slt i32 %tmp158, 0
 ;CHECK-NEXT:  br i1 %Pivot, label %LeafBlock, label %bb338
 

Modified: llvm/trunk/test/Transforms/PlaceSafepoints/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PlaceSafepoints/basic.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/PlaceSafepoints/basic.ll (original)
+++ llvm/trunk/test/Transforms/PlaceSafepoints/basic.ll Sat Nov 21 18:16:24 2015
@@ -74,7 +74,7 @@ define i1 @test_call_with_result() gc "s
 ; CHECK: gc.statepoint.p0f_isVoidf
 ; CHECK: gc.statepoint.p0f_i1i1f
 ; CHECK: (i64 2882400000, i32 0, i1 (i1)* @i1_return_i1, i32 1, i32 0, i1 false, i32 0, i32 0)
-; CHECK: %call1.2 = call i1 @llvm.experimental.gc.result.i1
+; CHECK: %call12 = call i1 @llvm.experimental.gc.result.i1
 entry:
   %call1 = tail call i1 (i1) @i1_return_i1(i1 false)
   ret i1 %call1

Modified: llvm/trunk/test/Transforms/PlaceSafepoints/call_gc_result.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PlaceSafepoints/call_gc_result.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/PlaceSafepoints/call_gc_result.ll (original)
+++ llvm/trunk/test/Transforms/PlaceSafepoints/call_gc_result.ll Sat Nov 21 18:16:24 2015
@@ -21,8 +21,8 @@ branch2:
 
 merge:
 ;; CHECK: 		%phi = phi i32 [ %a, %branch2 ], [ %b, %branch1 ]
-;; CHECK-NEXT:  %safepoint_token.1 = call i32 (i64, i32, i32 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32f(i64 2882400000, i32 0, i32 ()* @foo, i32 0, i32 0, i32 0, i32 0)
-;; CHECK-NEXT:  %ret.2 = call i32 @llvm.experimental.gc.result.i32(i32 %safepoint_token.1)
+;; CHECK-NEXT:  %safepoint_token1 = call i32 (i64, i32, i32 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32f(i64 2882400000, i32 0, i32 ()* @foo, i32 0, i32 0, i32 0, i32 0)
+;; CHECK-NEXT:  %ret2 = call i32 @llvm.experimental.gc.result.i32(i32 %safepoint_token1)
   %phi = phi i32 [ %a, %branch2 ], [ %b, %branch1 ]
   %ret = call i32 @foo()
   ret i32 %ret

Modified: llvm/trunk/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll (original)
+++ llvm/trunk/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll Sat Nov 21 18:16:24 2015
@@ -26,7 +26,7 @@ unwind_dest:
 
 normal_dest:
 ; CHECK: normal_dest:
-; CHECK-NEXT: %merge = phi i8 addrspace(1)* [ null, %entry ], [ %obj.2, %normal_dest1 ]
+; CHECK-NEXT: %merge = phi i8 addrspace(1)* [ null, %entry ], [ %obj2, %normal_dest1 ]
   %merge = phi i8 addrspace(1)* [ null, %entry ], [ %obj, %gc_invoke ]
   ret i8 addrspace(1)* %merge
 }

Modified: llvm/trunk/test/Transforms/RewriteStatepointsForGC/relocation.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/RewriteStatepointsForGC/relocation.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/RewriteStatepointsForGC/relocation.ll (original)
+++ llvm/trunk/test/Transforms/RewriteStatepointsForGC/relocation.ll Sat Nov 21 18:16:24 2015
@@ -94,7 +94,7 @@ join:
 ; CHECK-LABEL: join:
 ; CHECK: phi i8 addrspace(1)*
 ; CHECK-DAG: [ %arg.relocated, %if_branch ]
-; CHECK-DAG: [ %arg.relocated3, %else_branch ]
+; CHECK-DAG: [ %arg.relocated4, %else_branch ]
 ; CHECK-NOT: phi
   call void (i8 addrspace(1)*) @some_call(i8 addrspace(1)* %arg)
   ret void

Modified: llvm/trunk/test/Transforms/Util/lowerswitch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Util/lowerswitch.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Util/lowerswitch.ll (original)
+++ llvm/trunk/test/Transforms/Util/lowerswitch.ll Sat Nov 21 18:16:24 2015
@@ -3,7 +3,7 @@
 ; Test that we don't crash and have a different basic block for each incoming edge.
 define void @test0() {
 ; CHECK-LABEL: @test0
-; CHECK: %merge = phi i64 [ 1, %BB3 ], [ 0, %NewDefault ], [ 0, %NodeBlock.5 ], [ 0, %LeafBlock.1 ]
+; CHECK: %merge = phi i64 [ 1, %BB3 ], [ 0, %NewDefault ], [ 0, %NodeBlock5 ], [ 0, %LeafBlock1 ]
 BB1:
   switch i32 undef, label %BB2 [
     i32 3, label %BB2
@@ -43,9 +43,9 @@ bb2:
 
 bb3:
 ; CHECK-LABEL: bb3
-; CHECK: %tmp = phi i32 [ 1, %NodeBlock ], [ 0, %bb2 ], [ 1, %LeafBlock.3 ]
+; CHECK: %tmp = phi i32 [ 1, %NodeBlock ], [ 0, %bb2 ], [ 1, %LeafBlock3 ]
   %tmp = phi i32 [ 1, %bb1 ], [ 0, %bb2 ], [ 1, %bb1 ], [ 1, %bb1 ]
-; CHECK-NEXT: %tmp2 = phi i32 [ 2, %NodeBlock ], [ 5, %bb2 ], [ 2, %LeafBlock.3 ]
+; CHECK-NEXT: %tmp2 = phi i32 [ 2, %NodeBlock ], [ 5, %bb2 ], [ 2, %LeafBlock3 ]
   %tmp2 = phi i32 [ 2, %bb1 ], [ 2, %bb1 ], [ 5, %bb2 ], [ 2, %bb1 ]
   br label %exit
 

Modified: llvm/trunk/test/tools/gold/X86/comdat.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/gold/X86/comdat.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/tools/gold/X86/comdat.ll (original)
+++ llvm/trunk/test/tools/gold/X86/comdat.ll Sat Nov 21 18:16:24 2015
@@ -35,7 +35,7 @@ bb11:
 ; CHECK: @r21 = global i32* @v1{{$}}
 ; CHECK: @r22 = global i32 (i8*)* @f1{{$}}
 
-; CHECK: @v11 = internal global i32 41, comdat($c2)
+; CHECK: @v1.1 = internal global i32 41, comdat($c2)
 
 ; CHECK: @a11 = alias i32, i32* @v1{{$}}
 ; CHECK: @a12 = alias i16, bitcast (i32* @v1 to i16*)
@@ -43,11 +43,11 @@ bb11:
 ; CHECK: @a13 = alias i32 (i8*), i32 (i8*)* @f1{{$}}
 ; CHECK: @a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*)
 
-; CHECK: @a21 = alias i32, i32* @v11{{$}}
-; CHECK: @a22 = alias i16, bitcast (i32* @v11 to i16*)
+; CHECK: @a21 = alias i32, i32* @v1.1{{$}}
+; CHECK: @a22 = alias i16, bitcast (i32* @v1.1 to i16*)
 
-; CHECK: @a23 = alias i32 (i8*), i32 (i8*)* @f12{{$}}
-; CHECK: @a24 = alias i16, bitcast (i32 (i8*)* @f12 to i16*)
+; CHECK: @a23 = alias i32 (i8*), i32 (i8*)* @f1.2{{$}}
+; CHECK: @a24 = alias i16, bitcast (i32 (i8*)* @f1.2 to i16*)
 
 ; CHECK:      define weak_odr protected i32 @f1(i8*) comdat($c1) {
 ; CHECK-NEXT: bb10:
@@ -56,7 +56,7 @@ bb11:
 ; CHECK-NEXT:   ret i32 42
 ; CHECK-NEXT: }
 
-; CHECK:      define internal i32 @f12(i8* %this) comdat($c2) {
+; CHECK:      define internal i32 @f1.2(i8* %this) comdat($c2) {
 ; CHECK-NEXT: bb20:
 ; CHECK-NEXT:   store i8* %this, i8** null
 ; CHECK-NEXT:   br label %bb21

Modified: llvm/trunk/test/tools/llvm-split/unnamed.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-split/unnamed.ll?rev=253804&r1=253803&r2=253804&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-split/unnamed.ll (original)
+++ llvm/trunk/test/tools/llvm-split/unnamed.ll Sat Nov 21 18:16:24 2015
@@ -10,8 +10,8 @@ define internal void @0() {
   ret void
 }
 
-; CHECK0: declare hidden void @__llvmsplit_unnamed1()
-; CHECK1: define hidden void @__llvmsplit_unnamed1()
+; CHECK0: declare hidden void @__llvmsplit_unnamed.1()
+; CHECK1: define hidden void @__llvmsplit_unnamed.1()
 define internal void @1() {
   ; CHECK1: call void @foo()
   ; CHECK1: call void @foo()
@@ -23,7 +23,7 @@ define internal void @1() {
 ; CHECK0: define void @foo()
 ; CHECK1: declare void @foo()
 define void @foo() {
-  ; CHECK0: call void @__llvmsplit_unnamed1()
+  ; CHECK0: call void @__llvmsplit_unnamed.1()
   ; CHECK0: call void @__llvmsplit_unnamed()
   call void @1()
   call void @0()




More information about the llvm-commits mailing list