1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/lib
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
..
Analysis [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00
AsmParser IR: Introduce inrange attribute on getelementptr indices. 2016-11-10 22:34:55 +00:00
Bitcode Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-14 17:12:32 +00:00
CodeGen MIRParser: Add support for parsing vreg reg alloc hints 2016-11-15 00:03:14 +00:00
DebugInfo Improve DWARF parsing speed by improving DWARFAbbreviationDeclaration 2016-11-15 01:23:06 +00:00
Demangle Demangle: only demangle mangled symbols 2016-11-14 04:54:47 +00:00
ExecutionEngine [ORC] Re-apply 286620 with fixes for the ErrorSuccess class. 2016-11-11 21:42:09 +00:00
Fuzzer [libFuzzer] replace 'auto' with 'auto *' to better follow the LLVM style 2016-11-14 19:21:38 +00:00
IR [AVX-512] Remove and autoupgrade masked dword/qword variable shift intrinsics to the new unmasked versions and selects. 2016-11-14 01:53:22 +00:00
IRReader Bitcode: Change module reader functions to return an llvm::Expected. 2016-11-13 07:00:17 +00:00
LibDriver Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI. 2016-06-29 22:27:42 +00:00
LineEditor
Linker Linker: Remove unnecessary call to copyMetadata in IRLinker::linkGlobalVariable. 2016-11-14 23:18:38 +00:00
LTO [ThinLTO] Only promote exported locals as marked in index 2016-11-14 19:21:41 +00:00
MC Fix 24560: assembler does not share constant pool for same constants 2016-11-04 19:17:32 +00:00
Object Fix -Wswitch. 2016-11-15 00:58:50 +00:00
ObjectYAML Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 16:43:50 +00:00
Option Generalize ArgList::AddAllArgs more 2016-09-29 19:47:58 +00:00
Passes Conditionally eliminate library calls where the result value is not used 2016-10-18 21:36:27 +00:00
ProfileData Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
Support Add a file magic for CL.exe's object file created with /GL. 2016-11-15 00:54:54 +00:00
TableGen Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes. 2016-08-23 17:14:32 +00:00
Target AMDGPU: Set hasExtraSrcRegAllocReq on v_div_scale_* 2016-11-15 00:05:42 +00:00
Transforms [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00
CMakeLists.txt Try to fix a circular dependency in the modules build. 2016-09-06 20:16:19 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00