aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ValueMapper.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-03 21:23:52 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-03 21:23:52 +0000
commitfef609f15e09b4c42334a8ff8c2de29af502ff56 (patch)
treee2828f1845b49898b1aabb25d42b8bbdde52ac8c /llvm/lib/Transforms/Utils/ValueMapper.cpp
parentbd088744be436e74af45ba76cc28fbe6dbe4402d (diff)
downloadllvm-fef609f15e09b4c42334a8ff8c2de29af502ff56.zip
llvm-fef609f15e09b4c42334a8ff8c2de29af502ff56.tar.gz
llvm-fef609f15e09b4c42334a8ff8c2de29af502ff56.tar.bz2
IR: Lazily create ReplaceableMetadataImpl on MDNode
RAUW support on MDNode usually requires an extra allocation for ReplaceableMetadataImpl. This is only strictly necessary if there are tracking references to the MDNode. Make the construction of ReplaceableMetadataImpl lazy, so that we don't get allocations if we don't need them. Since MDNode::isResolved now checks MDNode::isTemporary and MDNode::NumUnresolved instead of whether a ReplaceableMetadataImpl is allocated, the internal changes are intrusive (at various internal checkpoints, isResolved now has a different answer). However, there should be no real functionality change here; just slightly lazier allocation behaviour. The external semantics should be identical. llvm-svn: 265279
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
0 files changed, 0 insertions, 0 deletions