OSDN Git Service

Linker: Avoid unnecessary work when moving named metadata
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 2 Apr 2016 17:39:31 +0000 (17:39 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 2 Apr 2016 17:39:31 +0000 (17:39 +0000)
commitdcf3121094d7d0666827454237000ab36d9b4056
tree2be8a7d33de973e3fce354cacf58531ec5d52646
parent1cb85674c6d6732881ee2b7b9879870b8cc692f0
Linker: Avoid unnecessary work when moving named metadata

IRLinker::mapUnneededSubprograms has to be sure that any "needed"
subprograms get linked in.  Rather than traversing through imported
entities using llvm::getSubprogram, call MapMetadata.  The latter
memoizes the result in the ValueMap (sharing work with
IRLinker::linkNamedMDNodes proper), and makes the local SmallPtrSet
redundant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265231 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/IRMover.cpp