diff options
| author | Mark de Wever <koraq@xs4all.nl> | 2019-12-22 19:20:17 +0100 |
|---|---|---|
| committer | Mark de Wever <koraq@xs4all.nl> | 2019-12-22 19:20:17 +0100 |
| commit | 098d3347e74ac89ea87744bf40ca98ade5e8468e (patch) | |
| tree | 95b0d3ab6a59b13650331ad6611b042af9c7bd0e /llvm/lib/Transforms/Utils | |
| parent | b6d9e976629ac655e0ed2655289e90357107793f (diff) | |
| download | bcm5719-llvm-098d3347e74ac89ea87744bf40ca98ade5e8468e.tar.gz bcm5719-llvm-098d3347e74ac89ea87744bf40ca98ade5e8468e.zip | |
[Transforms] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D71810
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 401a0e8acb0..6da612eb4e6 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1473,7 +1473,7 @@ static void updateCallerBFI(BasicBlock *CallSiteBlock, BlockFrequencyInfo *CalleeBFI, const BasicBlock &CalleeEntryBlock) { SmallPtrSet<BasicBlock *, 16> ClonedBBs; - for (auto const &Entry : VMap) { + for (auto Entry : VMap) { if (!isa<BasicBlock>(Entry.first) || !Entry.second) continue; auto *OrigBB = cast<BasicBlock>(Entry.first); @@ -1531,7 +1531,7 @@ void llvm::updateProfileCallee( // During inlining ? if (VMap) { uint64_t cloneEntryCount = priorEntryCount - newEntryCount; - for (auto const &Entry : *VMap) + for (auto Entry : *VMap) if (isa<CallInst>(Entry.first)) if (auto *CI = dyn_cast_or_null<CallInst>(Entry.second)) CI->updateProfWeight(cloneEntryCount, priorEntryCount); diff --git a/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp b/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp index 13f33277ff1..7a168ff6f32 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp @@ -584,7 +584,7 @@ static void cloneLoopBlocks( // LastValueMap is updated with the values for the current loop // which are used the next time this function is called. - for (const auto &KV : VMap) + for (auto KV : VMap) LVMap[KV.first] = KV.second; } |

