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/CodeGen/InlineSpiller.cpp | |
parent | 9b24dad6c06bba771b805ffd9bd047af25317e52 (diff) | |
download | llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.zip llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.gz llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.bz2 |
[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/CodeGen/InlineSpiller.cpp')
-rw-r--r-- | llvm/lib/CodeGen/InlineSpiller.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp index 75d9784..f33f811 100644 --- a/llvm/lib/CodeGen/InlineSpiller.cpp +++ b/llvm/lib/CodeGen/InlineSpiller.cpp @@ -1427,7 +1427,7 @@ void HoistSpillHelper::runHoistSpills( } // For spills in SpillsToKeep with LiveReg set (i.e., not original spill), // save them to SpillsToIns. - for (const auto Ent : SpillsToKeep) { + for (const auto &Ent : SpillsToKeep) { if (Ent.second) SpillsToIns[Ent.first->getBlock()] = Ent.second; } @@ -1486,7 +1486,7 @@ void HoistSpillHelper::hoistAllSpills() { LLVM_DEBUG({ dbgs() << "Finally inserted spills in BB: "; - for (const auto Ispill : SpillsToIns) + for (const auto &Ispill : SpillsToIns) dbgs() << Ispill.first->getNumber() << " "; dbgs() << "\nFinally removed spills in BB: "; for (const auto Rspill : SpillsToRm) @@ -1501,7 +1501,7 @@ void HoistSpillHelper::hoistAllSpills() { StackIntvl.getValNumInfo(0)); // Insert hoisted spills. - for (auto const Insert : SpillsToIns) { + for (auto const &Insert : SpillsToIns) { MachineBasicBlock *BB = Insert.first; unsigned LiveReg = Insert.second; MachineBasicBlock::iterator MI = IPA.getLastInsertPointIter(OrigLI, *BB); |