summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2018-12-13 01:11:52 +0000
committerDavide Italiano <davide@freebsd.org>2018-12-13 01:11:52 +0000
commit8ee59ca65380969fc9e8eb1eb6e631e9fa9772b3 (patch)
tree479df737e6dbcbc7f688e4fa7028e1699b32d58a /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent04afb4a17d1d834e13377db53d38af88a97f1e2f (diff)
downloadbcm5719-llvm-8ee59ca65380969fc9e8eb1eb6e631e9fa9772b3.tar.gz
bcm5719-llvm-8ee59ca65380969fc9e8eb1eb6e631e9fa9772b3.zip
[LoopUtils] Prefer a set over a map. NFCI.
llvm-svn: 348999
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUtils.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index a5d88d8269f..859a889c2e7 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -570,9 +570,7 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT = nullptr,
}
// Use a map to unique and a vector to guarantee deterministic ordering.
- llvm::SmallDenseMap<std::pair<DIVariable *, DIExpression *>,
- DbgVariableIntrinsic *, 4>
- DeadDebugMap;
+ llvm::SmallDenseSet<std::pair<DIVariable *, DIExpression *>, 4> DeadDebugSet;
llvm::SmallVector<DbgVariableIntrinsic *, 4> DeadDebugInst;
// Given LCSSA form is satisfied, we should not have users of instructions
@@ -602,10 +600,10 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT = nullptr,
auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I);
if (!DVI)
continue;
- auto Key = DeadDebugMap.find({DVI->getVariable(), DVI->getExpression()});
- if (Key != DeadDebugMap.end())
+ auto Key = DeadDebugSet.find({DVI->getVariable(), DVI->getExpression()});
+ if (Key != DeadDebugSet.end())
continue;
- DeadDebugMap[{DVI->getVariable(), DVI->getExpression()}] = DVI;
+ DeadDebugSet.insert({DVI->getVariable(), DVI->getExpression()});
DeadDebugInst.push_back(DVI);
}
OpenPOWER on IntegriCloud