summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-10-20 09:16:49 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-10-20 09:16:49 +0000
commit14cfa0dcdc4a476bdbeff66cb0297ce68a1b8ad5 (patch)
treed91dcaecb1c3f2414cdc5d1079e9b009e73aeeb6 /llvm/lib
parent4a5b01ddd7dd12f9a5826741e57104e8bf54748b (diff)
downloadbcm5719-llvm-14cfa0dcdc4a476bdbeff66cb0297ce68a1b8ad5.tar.gz
bcm5719-llvm-14cfa0dcdc4a476bdbeff66cb0297ce68a1b8ad5.zip
DebugInfo: Use base address specifiers more aggressively
Using a base address specifier even for a single-element range is a size win for object files (7 words versus 8 words - more significant savings if the debug info is compressed (since it's 3 words of uncompressable reloc + 4 compressable words compared to 6 uncompressable reloc + 2 compressable words) - does trade off executable size increase though. llvm-svn: 344841
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 3d842e70138..2f14f5464fd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2163,7 +2163,7 @@ static void emitRangeList(DwarfDebug &DD, AsmPrinter *Asm,
// or optnone where there may be holes in a single CU's section
// contributions.
auto *Base = CUBase;
- if (!Base && P.second.size() > 1 &&
+ if (!Base && (P.second.size() > 1 || DwarfVersion < 5) &&
(UseDwarfRangesBaseAddressSpecifier || DwarfVersion >= 5)) {
BaseIsSet = true;
// FIXME/use care: This may not be a useful base address if it's not
OpenPOWER on IntegriCloud