ValueMapper: Stop memoizing ConstantAsMetadata
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 16 Apr 2016 03:39:44 +0000 (03:39 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 16 Apr 2016 03:39:44 +0000 (03:39 +0000)
commita77d073305acde5afa0b61daf3fe1a823ed8ad81
tree73443ec4b64969cb1f80902f3538b2c412c64335
parent0d2ef0158926973d6a977d71de5cc455cff2599a
ValueMapper: Stop memoizing ConstantAsMetadata

Stop memoizing ConstantAsMetadata in ValueMapper::mapMetadata.  Now we
have to recompute it, but these metadata aren't particularly common, and
it restricts the lifetime of the Metadata map unnecessarily.

(The motivation is that I have a patch which uses a single Metadata map
for the lifetime of IRMover.  Mehdi profiled r266446 with the patch
applied and we saw a pretty big speedup in lib/Linker.)

llvm-svn: 266513
llvm/lib/Transforms/Utils/ValueMapper.cpp
llvm/unittests/Transforms/Utils/ValueMapperTest.cpp