summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/ExtDebugInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-17 07:45:08 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-17 07:45:08 +0000
commitf9521b0bb7fa9a502170f1dd4dd16a1dab75cdfc (patch)
treee56b83e8ef35be68abdca08922c8289b5c347e4e /clang/test/Modules/ExtDebugInfo.cpp
parent2c66b23d79c9f9a2c0b1113e9eec305600080943 (diff)
downloadbcm5719-llvm-f9521b0bb7fa9a502170f1dd4dd16a1dab75cdfc.tar.gz
bcm5719-llvm-f9521b0bb7fa9a502170f1dd4dd16a1dab75cdfc.zip
DebugInfo: Make DICompositeTypes distinct most of the time
Since elements of most kinds of DICompositeType have back references, most are involved in uniquing cycles. Except via the ODR 'identifier:' field, which doesn't care about the storage type (see r266549), they have no hope of being uniqued. Distinct nodes are far more efficient, so use them for most kinds of DICompositeType definitions (i.e., when DIType::isForwardDecl is false). The exceptions: - DW_TAG_array_type, since their elements never have back-references and they never have ODR 'identifier:' fields; - DW_TAG_enumeration_type when there is no ODR 'identifier:' field, since their elements usually don't have back-references. This breaks the last major uniquing cycle I'm aware of in the debug info graph. The impact won't be enormous for C++ because references to ODR-uniqued nodes still use string-based DITypeRefs; but this should prevent a regression in C++ when we drop the string-based references. This wouldn't have been reasonable until r266549, when composite types stopped relying on being uniqued by structural equivalence to prevent blow-ups at LTO time. llvm-svn: 266556
Diffstat (limited to 'clang/test/Modules/ExtDebugInfo.cpp')
-rw-r--r--clang/test/Modules/ExtDebugInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp
index 3b4547a87e0..6c38e7f464a 100644
--- a/clang/test/Modules/ExtDebugInfo.cpp
+++ b/clang/test/Modules/ExtDebugInfo.cpp
@@ -91,11 +91,11 @@ void foo() {
// CHECK: !DIGlobalVariable(name: "GlobalUnion",
// CHECK-SAME: type: ![[GLOBAL_UNION:[0-9]+]]
-// CHECK: ![[GLOBAL_UNION]] = !DICompositeType(tag: DW_TAG_union_type,
+// CHECK: ![[GLOBAL_UNION]] = distinct !DICompositeType(tag: DW_TAG_union_type,
// CHECK-SAME: elements: !{{[0-9]+}})
// CHECK: !DIGlobalVariable(name: "GlobalStruct",
// CHECK-SAME: type: ![[GLOBAL_STRUCT:[0-9]+]]
-// CHECK: ![[GLOBAL_STRUCT]] = !DICompositeType(tag: DW_TAG_structure_type,
+// CHECK: ![[GLOBAL_STRUCT]] = distinct !DICompositeType(tag: DW_TAG_structure_type,
// CHECK-SAME: elements: !{{[0-9]+}})
// CHECK: !DIGlobalVariable(name: "anon",
OpenPOWER on IntegriCloud