summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2019-08-28 17:43:14 +0000
committerPirama Arumuga Nainar <pirama@google.com>2019-08-28 17:43:14 +0000
commit19205abaaa3e952b97ed1c3f487e1377b7cc3302 (patch)
tree2b05de48dc0a2e1b9797a97f1cf880d59cbc15a5 /llvm/lib
parentb18f11eeeaf7013aaea5fa4aaae0369c5cc67603 (diff)
downloadbcm5719-llvm-19205abaaa3e952b97ed1c3f487e1377b7cc3302.tar.gz
bcm5719-llvm-19205abaaa3e952b97ed1c3f487e1377b7cc3302.zip
[ValueMapper] NFC: Remove dead code to pause metadata mapping
Summary: This functionality was added when Mapper::mapMetadata was recursive. It is no longer needed after r265456, which switched it to be iterative. Reviewers: dexonsmith, srhines Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66860 llvm-svn: 370236
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index 6aca0e417bb..da68d3713b4 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -774,20 +774,6 @@ Metadata *MDNodeMapper::mapTopLevelUniquedNode(const MDNode &FirstN) {
return *getMappedOp(&FirstN);
}
-namespace {
-
-struct MapMetadataDisabler {
- ValueToValueMapTy &VM;
-
- MapMetadataDisabler(ValueToValueMapTy &VM) : VM(VM) {
- VM.disableMapMetadata();
- }
-
- ~MapMetadataDisabler() { VM.enableMapMetadata(); }
-};
-
-} // end anonymous namespace
-
Optional<Metadata *> Mapper::mapSimpleMetadata(const Metadata *MD) {
// If the value already exists in the map, use it.
if (Optional<Metadata *> NewMD = getVM().getMappedMD(MD))
@@ -802,9 +788,6 @@ Optional<Metadata *> Mapper::mapSimpleMetadata(const Metadata *MD) {
return const_cast<Metadata *>(MD);
if (auto *CMD = dyn_cast<ConstantAsMetadata>(MD)) {
- // Disallow recursion into metadata mapping through mapValue.
- MapMetadataDisabler MMD(getVM());
-
// Don't memoize ConstantAsMetadata. Instead of lasting until the
// LLVMContext is destroyed, they can be deleted when the GlobalValue they
// reference is destructed. These aren't super common, so the extra
OpenPOWER on IntegriCloud