1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib
Duncan P. N. Exon Smith 29a6fcc535 Bitcode: Fix major regression: large files w/ debug info
The metadata/value split introduced a major regression reading large
bitcode files that contain debug info (or other cyclic (non-self
reference) metadata graphs).  For the first time in a while, I dropped
from libLTO.dylib down to `llvm-lto` with a non-trivial bitcode file
(~350MB), and I hit this when reading the result of ld64's `-save-temps`
in `llvm-lto`.

Here's pseudo-code for what was going on:

    read-main-metadata-block:
      for each md:
        if has-fwd-ref: // Only true for cyclic graphs.
          any-fwd-refs <- true
      if any-fwd-refs:
        foreach md:
          resolve-cycles(md) // Handle cycles.

    foreach function:
      read-function-metadata-block: // Such as !alias, !loop
        if any-fwd-refs:
          foreach md: // (all metadata, not just this block)
            resolve-cycles(md) // A no-op, but the loop is expensive!!

This commit resets the `AnyFwdRefs` flag to `false`.  This on its own
was enough to change my Release+Asserts `llvm-lto` time for reading this
bitcode from over 20 minutes (I gave up on it) to 20 seconds.  I've gone
further by tracking the min/max metadata forward-references in a
metadata block.  This protects against a schema that has lots of
functions that each reference their own metadata cycle.

Unfortunately, this regression is in the 3.6 branch as well.

llvm-svn: 229421
2015-02-16 19:18:01 +00:00
..
Analysis Revert 229175 2015-02-15 19:07:31 +00:00
AsmParser AsmParser: extractvalue requires at least one index operand 2015-02-16 09:18:13 +00:00
Bitcode Bitcode: Fix major regression: large files w/ debug info 2015-02-16 19:18:01 +00:00
CodeGen MSVC 2013 supports std::forward_as_tuple, while MSVC 2012 did not; so we can move to using the improved API. 2015-02-16 18:21:19 +00:00
DebugInfo llvm-pdbdump: Add flags controlling the type of values to dump. 2015-02-15 20:27:53 +00:00
ExecutionEngine [ExecutionEngine] Fix dependence issue by moving RTDyldMemoryManager into 2015-02-15 23:22:43 +00:00
Fuzzer [fuzzer] move default sanitizer options to a separate file 2015-02-06 19:52:07 +00:00
IR ConstantFold: Properly fold GEP indices wider than i64 2015-02-16 19:10:02 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker [LinkModules] Change the way ModuleLinker merges triples. 2015-02-13 00:40:41 +00:00
LTO [PM] Remove the old 'PassManager.h' header file at the top level of 2015-02-13 10:01:29 +00:00
MC Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
Object Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Option Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
ProfileData Fix accidental bit flip. 2015-02-12 16:30:00 +00:00
Support We require MSVC 1800 as our minimum, so these checks can safely go away; NFC. 2015-02-16 18:23:00 +00:00
TableGen Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Target We require MSVC 1800 as our minimum, so these checks can safely go away; NFC. (It seems this code has been copy/pasted around, unfortunately.) 2015-02-16 18:34:57 +00:00
Transforms Run LICM as part of the cleanup phase from the scalar optimizer. 2015-02-16 18:59:54 +00:00
CMakeLists.txt Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
LLVMBuild.txt
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00