summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-12-17 08:27:19 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-12-17 08:27:19 +0000
commit884deed1b383b869b0e785a2fa5a823bfd4d00e3 (patch)
treecc875f5a30542bc9e5d7aca575d9cf96ef9ea708 /llvm/lib/DebugInfo
parentcc5e6a72de590bff4f1e68b7271d9f82bc66b995 (diff)
downloadbcm5719-llvm-884deed1b383b869b0e785a2fa5a823bfd4d00e3.tar.gz
bcm5719-llvm-884deed1b383b869b0e785a2fa5a823bfd4d00e3.zip
DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses)
GCC emitted these unconditionally on/before 4.4/March 2012 Clang emitted these unconditionally on/before 3.5/March 2014 This improves performance when parsing CUs (especially those using split DWARF) that contain no code ranges (such as the mini CUs that may be created by ThinLTO importing - though generally they should be/are avoided, especially for Split DWARF because it produces a lot of very small CUs, which don't scale well in a bunch of other ways too (including size)). llvm-svn: 349333
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
index 48900e4b7a2..569512cb8f0 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
@@ -581,27 +581,6 @@ void DWARFUnit::collectAddressRanges(DWARFAddressRangesVector &CURanges) {
} else
WithColor::error() << "decoding address ranges: "
<< toString(CUDIERangesOrError.takeError()) << '\n';
-
- // This function is usually called if there in no .debug_aranges section
- // in order to produce a compile unit level set of address ranges that
- // is accurate. If the DIEs weren't parsed, then we don't want all dies for
- // all compile units to stay loaded when they weren't needed. So we can end
- // up parsing the DWARF and then throwing them all away to keep memory usage
- // down.
- const bool ClearDIEs = extractDIEsIfNeeded(false) > 1;
- getUnitDIE().collectChildrenAddressRanges(CURanges);
-
- // Collect address ranges from DIEs in .dwo if necessary.
- bool DWOCreated = parseDWO();
- if (DWO)
- DWO->collectAddressRanges(CURanges);
- if (DWOCreated)
- DWO.reset();
-
- // Keep memory down by clearing DIEs if this generate function
- // caused them to be parsed.
- if (ClearDIEs)
- clearDIEs(true);
}
void DWARFUnit::updateAddressDieMap(DWARFDie Die) {
OpenPOWER on IntegriCloud