<div dir="ltr">Hmm - this might actually fix a debug info bug... I know it's in buganizer somewhere but don't recall the specifics.<br><br>I think it was about two anonymous structs on the same line (or in a macro) where building the type for one resulted in building the other type (and since they didn't have distinct names, the declaration metadata got uniqued... ).<br><br>I'll see if I can find it and/or reproduce it.<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 2:39 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dexonsmith<br>
Date: Thu Jan 8 16:39:28 2015<br>
New Revision: 225475<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225475&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=225475&view=rev</a><br>
Log:<br>
IR: Add 'distinct' MDNodes to bitcode and assembly (clang)<br>
<br>
Update testcases for LLVM change in r225474 to make `MDNode`s explicitly<br>
distinct (when they aren't uniqued).<br>
<br>
Part of PR22111.<br>
<br>
Modified:<br>
cfe/trunk/test/CodeGen/pragma-loop.cpp<br>
cfe/trunk/test/CodeGen/pragma-unroll.cpp<br>
cfe/trunk/test/CodeGenCXX/debug-info.cpp<br>
cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp<br>
cfe/trunk/test/OpenMP/simd_metadata.c<br>
<br>
Modified: cfe/trunk/test/CodeGen/pragma-loop.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/pragma-loop.cpp?rev=225475&r1=225474&r2=225475&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/pragma-loop.cpp?rev=225475&r1=225474&r2=225475&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/pragma-loop.cpp (original)<br>
+++ cfe/trunk/test/CodeGen/pragma-loop.cpp Thu Jan 8 16:39:28 2015<br>
@@ -157,35 +157,35 @@ void template_test(double *List, int Len<br>
for_template_constant_expression_test<double, 2, 4, 8>(List, Length);<br>
}<br>
<br>
-// CHECK: ![[LOOP_1]] = !{![[LOOP_1]], ![[UNROLL_FULL:.*]], ![[WIDTH_4:.*]], ![[INTERLEAVE_4:.*]], ![[INTENABLE_1:.*]]}<br>
+// CHECK: ![[LOOP_1]] = distinct !{![[LOOP_1]], ![[UNROLL_FULL:.*]], ![[WIDTH_4:.*]], ![[INTERLEAVE_4:.*]], ![[INTENABLE_1:.*]]}<br>
// CHECK: ![[UNROLL_FULL]] = !{!"llvm.loop.unroll.full"}<br>
// CHECK: ![[WIDTH_4]] = !{!"llvm.loop.vectorize.width", i32 4}<br>
// CHECK: ![[INTERLEAVE_4]] = !{!"llvm.loop.interleave.count", i32 4}<br>
// CHECK: ![[INTENABLE_1]] = !{!"llvm.loop.vectorize.enable", i1 true}<br>
-// CHECK: ![[LOOP_2]] = !{![[LOOP_2:.*]], ![[UNROLL_DISABLE:.*]], ![[INTERLEAVE_4:.*]], ![[WIDTH_8:.*]]}<br>
+// CHECK: ![[LOOP_2]] = distinct !{![[LOOP_2:.*]], ![[UNROLL_DISABLE:.*]], ![[INTERLEAVE_4:.*]], ![[WIDTH_8:.*]]}<br>
// CHECK: ![[UNROLL_DISABLE]] = !{!"llvm.loop.unroll.disable"}<br>
// CHECK: ![[WIDTH_8]] = !{!"llvm.loop.vectorize.width", i32 8}<br>
-// CHECK: ![[LOOP_3]] = !{![[LOOP_3]], ![[UNROLL_8:.*]], ![[INTERLEAVE_4:.*]], ![[ENABLE_1:.*]]}<br>
+// CHECK: ![[LOOP_3]] = distinct !{![[LOOP_3]], ![[UNROLL_8:.*]], ![[INTERLEAVE_4:.*]], ![[ENABLE_1:.*]]}<br>
// CHECK: ![[UNROLL_8]] = !{!"llvm.loop.unroll.count", i32 8}<br>
-// CHECK: ![[LOOP_4]] = !{![[LOOP_4]], ![[INTERLEAVE_2:.*]], ![[WIDTH_2:.*]]}<br>
+// CHECK: ![[LOOP_4]] = distinct !{![[LOOP_4]], ![[INTERLEAVE_2:.*]], ![[WIDTH_2:.*]]}<br>
// CHECK: ![[INTERLEAVE_2]] = !{!"llvm.loop.interleave.count", i32 2}<br>
// CHECK: ![[WIDTH_2]] = !{!"llvm.loop.vectorize.width", i32 2}<br>
-// CHECK: ![[LOOP_5]] = !{![[LOOP_5]], ![[UNROLL_DISABLE:.*]], ![[WIDTH_1:.*]]}<br>
+// CHECK: ![[LOOP_5]] = distinct !{![[LOOP_5]], ![[UNROLL_DISABLE:.*]], ![[WIDTH_1:.*]]}<br>
// CHECK: ![[WIDTH_1]] = !{!"llvm.loop.vectorize.width", i32 1}<br>
-// CHECK: ![[LOOP_6]] = !{![[LOOP_6]], ![[UNROLL_8:.*]], ![[INTERLEAVE_2:.*]], ![[WIDTH_2:.*]]}<br>
-// CHECK: ![[LOOP_7]] = !{![[LOOP_7]], ![[WIDTH_5:.*]]}<br>
+// CHECK: ![[LOOP_6]] = distinct !{![[LOOP_6]], ![[UNROLL_8:.*]], ![[INTERLEAVE_2:.*]], ![[WIDTH_2:.*]]}<br>
+// CHECK: ![[LOOP_7]] = distinct !{![[LOOP_7]], ![[WIDTH_5:.*]]}<br>
// CHECK: ![[WIDTH_5]] = !{!"llvm.loop.vectorize.width", i32 5}<br>
-// CHECK: ![[LOOP_8]] = !{![[LOOP_8]], ![[WIDTH_5:.*]]}<br>
-// CHECK: ![[LOOP_9]] = !{![[LOOP_9]], ![[UNROLL_8:.*]], ![[INTERLEAVE_8:.*]], ![[WIDTH_8:.*]]}<br>
+// CHECK: ![[LOOP_8]] = distinct !{![[LOOP_8]], ![[WIDTH_5:.*]]}<br>
+// CHECK: ![[LOOP_9]] = distinct !{![[LOOP_9]], ![[UNROLL_8:.*]], ![[INTERLEAVE_8:.*]], ![[WIDTH_8:.*]]}<br>
// CHECK: ![[INTERLEAVE_8]] = !{!"llvm.loop.interleave.count", i32 8}<br>
-// CHECK: ![[LOOP_10]] = !{![[LOOP_10]], ![[UNROLL_8:.*]], ![[INTERLEAVE_2:.*]], ![[WIDTH_2:.*]]}<br>
-// CHECK: ![[LOOP_11]] = !{![[LOOP_11]], ![[UNROLL_8:.*]], ![[INTERLEAVE_4:.*]], ![[WIDTH_2:.*]]}<br>
-// CHECK: ![[LOOP_12]] = !{![[LOOP_12]], ![[UNROLL_24:.*]], ![[INTERLEAVE_10:.*]], ![[WIDTH_6:.*]]}<br>
+// CHECK: ![[LOOP_10]] = distinct !{![[LOOP_10]], ![[UNROLL_8:.*]], ![[INTERLEAVE_2:.*]], ![[WIDTH_2:.*]]}<br>
+// CHECK: ![[LOOP_11]] = distinct !{![[LOOP_11]], ![[UNROLL_8:.*]], ![[INTERLEAVE_4:.*]], ![[WIDTH_2:.*]]}<br>
+// CHECK: ![[LOOP_12]] = distinct !{![[LOOP_12]], ![[UNROLL_24:.*]], ![[INTERLEAVE_10:.*]], ![[WIDTH_6:.*]]}<br>
// CHECK: ![[UNROLL_24]] = !{!"llvm.loop.unroll.count", i32 24}<br>
// CHECK: ![[INTERLEAVE_10]] = !{!"llvm.loop.interleave.count", i32 10}<br>
// CHECK: ![[WIDTH_6]] = !{!"llvm.loop.vectorize.width", i32 6}<br>
-// CHECK: ![[LOOP_13]] = !{![[LOOP_13]], ![[UNROLL_32:.*]], ![[INTERLEAVE_16:.*]], ![[WIDTH_8:.*]]}<br>
+// CHECK: ![[LOOP_13]] = distinct !{![[LOOP_13]], ![[UNROLL_32:.*]], ![[INTERLEAVE_16:.*]], ![[WIDTH_8:.*]]}<br>
// CHECK: ![[UNROLL_32]] = !{!"llvm.loop.unroll.count", i32 32}<br>
// CHECK: ![[INTERLEAVE_16]] = !{!"llvm.loop.interleave.count", i32 16}<br>
-// CHECK: ![[LOOP_14]] = !{![[LOOP_14]], ![[WIDTH_10:.*]]}<br>
+// CHECK: ![[LOOP_14]] = distinct !{![[LOOP_14]], ![[WIDTH_10:.*]]}<br>
// CHECK: ![[WIDTH_10]] = !{!"llvm.loop.vectorize.width", i32 10}<br>
<br>
Modified: cfe/trunk/test/CodeGen/pragma-unroll.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/pragma-unroll.cpp?rev=225475&r1=225474&r2=225475&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/pragma-unroll.cpp?rev=225475&r1=225474&r2=225475&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/pragma-unroll.cpp (original)<br>
+++ cfe/trunk/test/CodeGen/pragma-unroll.cpp Thu Jan 8 16:39:28 2015<br>
@@ -86,14 +86,14 @@ void template_test(double *List, int Len<br>
for_template_define_test<double>(List, Length, Value);<br>
}<br>
<br>
-// CHECK: ![[LOOP_1]] = !{![[LOOP_1]], ![[UNROLL_FULL:.*]]}<br>
+// CHECK: ![[LOOP_1]] = distinct !{![[LOOP_1]], ![[UNROLL_FULL:.*]]}<br>
// CHECK: ![[UNROLL_FULL]] = !{!"llvm.loop.unroll.full"}<br>
-// CHECK: ![[LOOP_2]] = !{![[LOOP_2:.*]], ![[UNROLL_DISABLE:.*]]}<br>
+// CHECK: ![[LOOP_2]] = distinct !{![[LOOP_2:.*]], ![[UNROLL_DISABLE:.*]]}<br>
// CHECK: ![[UNROLL_DISABLE]] = !{!"llvm.loop.unroll.disable"}<br>
-// CHECK: ![[LOOP_3]] = !{![[LOOP_3]], ![[UNROLL_8:.*]]}<br>
+// CHECK: ![[LOOP_3]] = distinct !{![[LOOP_3]], ![[UNROLL_8:.*]]}<br>
// CHECK: ![[UNROLL_8]] = !{!"llvm.loop.unroll.count", i32 8}<br>
-// CHECK: ![[LOOP_4]] = !{![[LOOP_4]], ![[UNROLL_4:.*]]}<br>
+// CHECK: ![[LOOP_4]] = distinct !{![[LOOP_4]], ![[UNROLL_4:.*]]}<br>
// CHECK: ![[UNROLL_4]] = !{!"llvm.loop.unroll.count", i32 4}<br>
-// CHECK: ![[LOOP_5]] = !{![[LOOP_5]], ![[UNROLL_8:.*]]}<br>
-// CHECK: ![[LOOP_6]] = !{![[LOOP_6]], ![[UNROLL_8:.*]]}<br>
-// CHECK: ![[LOOP_7]] = !{![[LOOP_7]], ![[UNROLL_8:.*]]}<br>
+// CHECK: ![[LOOP_5]] = distinct !{![[LOOP_5]], ![[UNROLL_8:.*]]}<br>
+// CHECK: ![[LOOP_6]] = distinct !{![[LOOP_6]], ![[UNROLL_8:.*]]}<br>
+// CHECK: ![[LOOP_7]] = distinct !{![[LOOP_7]], ![[UNROLL_8:.*]]}<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/debug-info.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info.cpp?rev=225475&r1=225474&r2=225475&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info.cpp?rev=225475&r1=225474&r2=225475&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenCXX/debug-info.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/debug-info.cpp Thu Jan 8 16:39:28 2015<br>
@@ -53,7 +53,7 @@ namespace VirtualBase {<br>
}<br>
}<br>
<br>
-// MSVC: [[VBASE_B:![0-9]+]] = !{!"0x13\00B\00{{[0-9]+}}\0096\0032\000\000\000", {{.*}}, null, [[VBASE_B_DEF:![0-9]+]], {{.*}}} ; [ DW_TAG_structure_type ] [B] [line 49, size 96, align 32, offset 0] [def] [from ]<br>
+// MSVC: [[VBASE_B:![0-9]+]] = distinct !{!"0x13\00B\00{{[0-9]+}}\0096\0032\000\000\000", {{.*}}, null, [[VBASE_B_DEF:![0-9]+]], {{.*}}} ; [ DW_TAG_structure_type ] [B] [line 49, size 96, align 32, offset 0] [def] [from ]<br>
// MSVC: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]],<br>
//<br>
// Look for the vbtable offset of A, which should be 4.<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp?rev=225475&r1=225474&r2=225475&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp?rev=225475&r1=225474&r2=225475&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp Thu Jan 8 16:39:28 2015<br>
@@ -4,7 +4,7 @@<br>
// rid of self-referenceing structure_types (PR21902), then it should be safe<br>
// to just kill this test.<br>
//<br>
-// CHECK: ![[SELF:[0-9]+]] = !{!"0x13\00B\00{{[^"]*}}", {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, ![[SELF]], {{[^}]+}}} ; [ DW_TAG_structure_type ] [B]<br>
+// CHECK: ![[SELF:[0-9]+]] = distinct !{!"0x13\00B\00{{[^"]*}}", {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, ![[SELF]], {{[^}]+}}} ; [ DW_TAG_structure_type ] [B]<br>
<br>
void foo() {<br>
struct V {<br>
<br>
Modified: cfe/trunk/test/OpenMP/simd_metadata.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_metadata.c?rev=225475&r1=225474&r2=225475&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_metadata.c?rev=225475&r1=225474&r2=225475&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/simd_metadata.c (original)<br>
+++ cfe/trunk/test/OpenMP/simd_metadata.c Thu Jan 8 16:39:28 2015<br>
@@ -52,13 +52,13 @@ void h3(float *c, float *a, float *b, in<br>
}<br>
<br>
// Metadata for h1:<br>
-// CHECK: [[LOOP_H1_HEADER:![0-9]+]] = !{[[LOOP_H1_HEADER]], [[LOOP_WIDTH_16:![0-9]+]], [[LOOP_VEC_ENABLE:![0-9]+]]}<br>
+// CHECK: [[LOOP_H1_HEADER:![0-9]+]] = distinct !{[[LOOP_H1_HEADER]], [[LOOP_WIDTH_16:![0-9]+]], [[LOOP_VEC_ENABLE:![0-9]+]]}<br>
// CHECK: [[LOOP_WIDTH_16]] = !{!"llvm.loop.vectorize.width", i32 16}<br>
// CHECK: [[LOOP_VEC_ENABLE]] = !{!"llvm.loop.vectorize.enable", i1 true}<br>
//<br>
// Metadata for h2:<br>
-// CHECK: [[LOOP_H2_HEADER]] = !{[[LOOP_H2_HEADER]], [[LOOP_VEC_ENABLE]]}<br>
+// CHECK: [[LOOP_H2_HEADER]] = distinct !{[[LOOP_H2_HEADER]], [[LOOP_VEC_ENABLE]]}<br>
//<br>
// Metadata for h3:<br>
-// CHECK: [[LOOP_H3_HEADER:![0-9]+]] = !{[[LOOP_H3_HEADER]], [[LOOP_VEC_ENABLE]]}<br>
+// CHECK: [[LOOP_H3_HEADER:![0-9]+]] = distinct !{[[LOOP_H3_HEADER]], [[LOOP_VEC_ENABLE]]}<br>
//<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>