diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-09 21:08:19 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-09 21:08:19 +0000 |
commit | 6e98cd32dce336ebac8382b00f4a03a5a0e99651 (patch) | |
tree | 4f4daa4fdf38e018c2eb084a2fe7914886d4866a /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 3ce825ed26684e4105e6606c8862edfc713b9d3a (diff) | |
download | bcm5719-llvm-6e98cd32dce336ebac8382b00f4a03a5a0e99651.tar.gz bcm5719-llvm-6e98cd32dce336ebac8382b00f4a03a5a0e99651.zip |
CodeGen: Avoid more ilist iterator implicit conversions, NFC
llvm-svn: 249903
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index fab56bcfe85..13e753692de 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -148,7 +148,7 @@ void PEI::calculateSets(MachineFunction &Fn) { } // Save refs to entry and return blocks. - SaveBlocks.push_back(Fn.begin()); + SaveBlocks.push_back(&Fn.front()); for (MachineBasicBlock &MBB : Fn) { if (MBB.isEHFuncletEntry()) SaveBlocks.push_back(&MBB); @@ -829,12 +829,12 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) { } // Handle the unreachable blocks. - for (MachineFunction::iterator BB = Fn.begin(), E = Fn.end(); BB != E; ++BB) { - if (Reachable.count(BB)) + for (auto &BB : Fn) { + if (Reachable.count(&BB)) // Already handled in DFS traversal. continue; int SPAdj = 0; - replaceFrameIndices(BB, Fn, SPAdj); + replaceFrameIndices(&BB, Fn, SPAdj); } } @@ -967,7 +967,7 @@ PEI::scavengeFrameVirtualRegs(MachineFunction &Fn) { // Run through the instructions and find any virtual registers. for (MachineFunction::iterator BB = Fn.begin(), E = Fn.end(); BB != E; ++BB) { - RS->enterBasicBlock(BB); + RS->enterBasicBlock(&*BB); int SPAdj = 0; @@ -1028,7 +1028,7 @@ PEI::scavengeFrameVirtualRegs(MachineFunction &Fn) { // problem because we need the spill code before I: Move I to just // prior to J. if (I != std::prev(J)) { - BB->splice(J, BB, I); + BB->splice(J, &*BB, I); // Before we move I, we need to prepare the RS to visit I again. // Specifically, RS will assert if it sees uses of registers that |