1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests/Transforms
Duncan P. N. Exon Smith a6c2e1e60b Linker: Move distinct MDNodes instead of cloning
Instead of cloning distinct `MDNode`s when linking in a module, just
move them over.  The module linker destroys the source module, so the
old node would otherwise just be leaked on the context.  Create the new
node in place.  This also reduces the number of cloned uniqued nodes
(since it's less likely their operands have changed).

This mapping strategy is only correct when we're discarding the source,
so the linker turns it on via a ValueMapper flag, `RF_MoveDistinctMDs`.

There's nothing observable in terms of `llvm-link` output here: the
linked module should be semantically identical.

I'll be adding more 'distinct' nodes to the debug info metadata graph in
order to break uniquing cycles, so the benefits of this will partly come
in future commits.  However, we should get some gains immediately, since
we have a fair number of 'distinct' `DILocation`s being linked in.

llvm-svn: 243883
2015-08-03 17:09:38 +00:00
..
IPO Add explicit type to empty std::set initializer to fix the libc++ build. 2015-03-03 01:39:13 +00:00
Utils Linker: Move distinct MDNodes instead of cloning 2015-08-03 17:09:38 +00:00
CMakeLists.txt Introduce bitset metadata format and bitset lowering pass. 2015-02-20 20:30:47 +00:00
Makefile Introduce bitset metadata format and bitset lowering pass. 2015-02-20 20:30:47 +00:00