1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
llvm-mirror/lib/Transforms
Mehdi Amini 324950270d Use lazy-loading of Metadata in MetadataLoader when importing is enabled (NFC)
Summary:
This is a relatively simple scheme: we use the index emitted in the
bitcode to avoid loading all the global metadata. Instead we load
the index with their position in the bitcode so that we can load each
of them individually. Materializing the global metadata block in this
condition only triggers loading the named metadata, and the ones
referenced from there (transitively). When materializing a function,
metadata from the global block are loaded lazily as they are
referenced.

Two main current limitations are:

1) Global values other than functions are not materialized on demand,
so we need to eagerly load METADATA_GLOBAL_DECL_ATTACHMENT records
(and their transitive dependencies).
2) When we load a single metadata, we don't recurse on the operands,
instead we use a placeholder or a temporary metadata. Unfortunately
tepmorary nodes are very expensive. This is why we don't have it
always enabled and only for importing.

These two limitations can be lifted in a subsequent improvement if
needed.

With this change, the total link time of opt with ThinLTO and Debug
Info enabled is going down from 282s to 224s (~20%).

Reviewers: pcc, tejohnson, dexonsmith

Subscribers: llvm-commits

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

llvm-svn: 291027
2017-01-04 22:54:33 +00:00
..
Coroutines Fix spelling mistakes in Transforms comments. NFC. 2016-11-20 13:19:49 +00:00
Hello
InstCombine InstCombine: Fold cos(-x) -> cos(x) 2017-01-04 22:49:03 +00:00
Instrumentation [sanitizer-coverage] sort the switch cases 2016-12-27 21:20:06 +00:00
IPO Use lazy-loading of Metadata in MetadataLoader when importing is enabled (NFC) 2017-01-04 22:54:33 +00:00
ObjCARC [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
Scalar NewGVN: Track the maximum number of iterations GVN takes on any function, so we can pinpoint performance issues. 2017-01-04 21:01:02 +00:00
Utils Reapply "[SimplifyCFG] In sinkLastInstruction correctly set debugloc of common inst" 2017-01-04 17:40:32 +00:00
Vectorize [LV] Sink tripcount query to where it's actually used. NFC. 2016-12-19 22:47:52 +00:00
CMakeLists.txt
LLVMBuild.txt