diff options
| author | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 17:23:21 +0100 |
|---|---|---|
| committer | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 20:01:37 +0100 |
| commit | 8dc7b982b4556c243e0502e6e230bdd53ddd65ff (patch) | |
| tree | 518a39bbece25299e56350272605c7a9bd8f60c6 /llvm/lib/Analysis | |
| parent | 9b24dad6c06bba771b805ffd9bd047af25317e52 (diff) | |
| download | bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.gz bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.zip | |
[NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D71857
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/DomTreeUpdater.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/DomTreeUpdater.cpp b/llvm/lib/Analysis/DomTreeUpdater.cpp index 49215889cfd..b374334ea37 100644 --- a/llvm/lib/Analysis/DomTreeUpdater.cpp +++ b/llvm/lib/Analysis/DomTreeUpdater.cpp @@ -233,7 +233,7 @@ void DomTreeUpdater::applyUpdates(ArrayRef<DominatorTree::UpdateType> Updates) { return; if (Strategy == UpdateStrategy::Lazy) { - for (const auto U : Updates) + for (const auto &U : Updates) if (!isSelfDominance(U)) PendUpdates.push_back(U); @@ -253,7 +253,7 @@ void DomTreeUpdater::applyUpdatesPermissive( SmallSet<std::pair<BasicBlock *, BasicBlock *>, 8> Seen; SmallVector<DominatorTree::UpdateType, 8> DeduplicatedUpdates; - for (const auto U : Updates) { + for (const auto &U : Updates) { auto Edge = std::make_pair(U.getFrom(), U.getTo()); // Because it is illegal to submit updates that have already been applied // and updates to an edge need to be strictly ordered, diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index 46f28fbca38..a97a56e2580 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -1494,7 +1494,7 @@ void MemoryDependenceResults::RemoveCachedNonLocalPointerDependencies( if (auto *I = dyn_cast<Instruction>(P.getPointer())) { auto toRemoveIt = ReverseNonLocalDefsCache.find(I); if (toRemoveIt != ReverseNonLocalDefsCache.end()) { - for (const auto &entry : toRemoveIt->second) + for (const auto *entry : toRemoveIt->second) NonLocalDefsCache.erase(entry); ReverseNonLocalDefsCache.erase(toRemoveIt); } diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 8fcea5d4cd3..5926bff5d23 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -12527,7 +12527,7 @@ PredicatedScalarEvolution::PredicatedScalarEvolution( const PredicatedScalarEvolution &Init) : RewriteMap(Init.RewriteMap), SE(Init.SE), L(Init.L), Preds(Init.Preds), Generation(Init.Generation), BackedgeCount(Init.BackedgeCount) { - for (const auto &I : Init.FlagsMap) + for (auto I : Init.FlagsMap) FlagsMap.insert(I); } |

