summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-11-20 18:40:16 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-11-20 18:40:16 +0000
commitbcb418e56f879a8df2428211e727e06f2b23b535 (patch)
treecf21f6c187029b51ab7b573ec0da66d7f531a14d /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parentc74010df48919a8360e3e095b1cdcbb71dda14be (diff)
downloadbcm5719-llvm-bcb418e56f879a8df2428211e727e06f2b23b535.tar.gz
bcm5719-llvm-bcb418e56f879a8df2428211e727e06f2b23b535.zip
CR feedback for r195166: Add comments regarding type unit mapping and type units disabling cross-CU sharing.
Changes suggested by Manman Ren. llvm-svn: 195262
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 2489002f7fd..688791e04ff 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -112,8 +112,13 @@ int64_t CompileUnit::getDefaultLowerBound() const {
/// Check whether the DIE for this MDNode can be shared across CUs.
static bool isShareableAcrossCUs(DIDescriptor D) {
- // When the MDNode can be part of the type system, the DIE can be
- // shared across CUs.
+ // When the MDNode can be part of the type system, the DIE can be shared
+ // across CUs.
+ // Combining type units and cross-CU DIE sharing is lower value (since
+ // cross-CU DIE sharing is used in LTO and removes type redundancy at that
+ // level already) but may be implementable for some value in projects
+ // building multiple independent libraries with LTO and then linking those
+ // together.
return (D.isType() ||
(D.isSubprogram() && !DISubprogram(D).isDefinition())) &&
!GenerateTypeUnits;
OpenPOWER on IntegriCloud