1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/DebugInfo/DWARF
Greg Clayton b646654f66 Improve DWARF parsing speed by improving DWARFAbbreviationDeclaration
This patch gets a DWARF parsing speed improvement by having DWARFAbbreviationDeclaration instances know if they have a fixed byte size. If an abbreviation has a fixed byte size that can be calculated given a DWARFUnit, then parsing a DIE becomes two steps: parse ULEB128 abbrev code, and then add constant size to the offset.

This patch also adds a fixed byte size to each DWARFAbbreviationDeclaration::AttributeSpec so that attributes can quickly skip their values if needed without the need to lookup the fixed for size.

Notable improvements:

- DWARFAbbreviationDeclaration::findAttributeIndex() now returns an Optional<uint32_t> instead of a uint32_t and we no longer have to look for the magic -1U return value
- Optional<uint32_t> DWARFAbbreviationDeclaration::findAttributeIndex(dwarf::Attribute attr) const;
- DWARFAbbreviationDeclaration now has a getAttributeValue() function that extracts an attribute value given a DIE offset that takes advantage of the DWARFAbbreviationDeclaration::AttributeSpec::ByteSize
- bool DWARFAbbreviationDeclaration::getAttributeValue(const uint32_t DIEOffset, const dwarf::Attribute Attr, const DWARFUnit &U, DWARFFormValue &FormValue) const;
- A DWARFAbbreviationDeclaration instance can return a fixed byte size for itself so DWARF parsing is faster:
- Optional<size_t> DWARFAbbreviationDeclaration::getFixedAttributesByteSize(const DWARFUnit &U) const;
- Any functions that used to take a "const DWARFUnit *U" that would crash if U was NULL now take a "const DWARFUnit &U" and are only called with a valid DWARFUnit

Differential Revision: https://reviews.llvm.org/D26567

llvm-svn: 286924
2016-11-15 01:23:06 +00:00
..
CMakeLists.txt Revert r282238 "Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section."" 2016-09-23 11:01:53 +00:00
DWARFAbbreviationDeclaration.cpp Improve DWARF parsing speed by improving DWARFAbbreviationDeclaration 2016-11-15 01:23:06 +00:00
DWARFAcceleratorTable.cpp Modify DWARFFormValue to remember the DWARFUnit that it was decoded with. 2016-10-31 16:46:02 +00:00
DWARFCompileUnit.cpp [DWARF parser] Make DWARF parser more robust against missing compile/type units. 2015-05-19 21:54:32 +00:00
DWARFContext.cpp dwarfdump: -summarize-types: print a short summary (unqualified type name, hash, length) of type units rather than dumping contents 2016-10-18 21:09:48 +00:00
DWARFDebugAbbrev.cpp
DWARFDebugAranges.cpp
DWARFDebugArangeSet.cpp
DWARFDebugFrame.cpp Re-commit "Use StringRef in Support/Darf APIs (NFC)" 2016-10-05 05:59:29 +00:00
DWARFDebugInfoEntry.cpp Improve DWARF parsing speed by improving DWARFAbbreviationDeclaration 2016-11-15 01:23:06 +00:00
DWARFDebugLine.cpp Re-commit "Use StringRef in Support/Darf APIs (NFC)" 2016-10-05 05:59:29 +00:00
DWARFDebugLoc.cpp Import/update constants from the DWARF 5 public review draft document. 2016-10-28 17:59:50 +00:00
DWARFDebugMacro.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
DWARFDebugRangeList.cpp
DWARFFormValue.cpp Fixed issues found by Paul Robinson with my patch for: 2016-11-11 17:38:14 +00:00
DWARFGdbIndex.cpp Revert r282238 "Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section."" 2016-09-23 11:01:53 +00:00
DWARFTypeUnit.cpp Modify DWARFFormValue to remember the DWARFUnit that it was decoded with. 2016-10-31 16:46:02 +00:00
DWARFUnit.cpp Improve DWARF parsing speed by improving DWARFAbbreviationDeclaration 2016-11-15 01:23:06 +00:00
DWARFUnitIndex.cpp dwarfdump: Correctly indentify the indicies for DWP records 2015-12-03 18:41:59 +00:00
LLVMBuild.txt
SyntaxHighlighting.cpp dwarfdump: Added macro support to llvm-dwarfdump tool. 2015-11-12 09:38:54 +00:00
SyntaxHighlighting.h dwarfdump: Added macro support to llvm-dwarfdump tool. 2015-11-12 09:38:54 +00:00