summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-13 20:02:15 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-13 20:02:15 +0000
commitd3b9df02b343d27d3ce9f11668688186fc552828 (patch)
treebc150a7c246f4f8876283f4e5f39b1dc909aadca /llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
parent34f292467580ee11d0de2353a4cd6620ef9a5eeb (diff)
downloadbcm5719-llvm-d3b9df02b343d27d3ce9f11668688186fc552828.tar.gz
bcm5719-llvm-d3b9df02b343d27d3ce9f11668688186fc552828.zip
AArch64: Remove implicit ilist iterator conversions, NFC
llvm-svn: 250216
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp b/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
index ccadf0cd1eb..a614f555a4e 100644
--- a/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
+++ b/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
@@ -142,14 +142,14 @@ void AArch64BranchRelaxation::dumpBBs() {
/// into the block immediately after it.
static bool BBHasFallthrough(MachineBasicBlock *MBB) {
// Get the next machine basic block in the function.
- MachineFunction::iterator MBBI = MBB;
+ MachineFunction::iterator MBBI(MBB);
// Can't fall off end of function.
- MachineBasicBlock *NextBB = std::next(MBBI);
+ auto NextBB = std::next(MBBI);
if (NextBB == MBB->getParent()->end())
return false;
for (MachineBasicBlock *S : MBB->successors())
- if (S == NextBB)
+ if (S == &*NextBB)
return true;
return false;
@@ -227,9 +227,7 @@ AArch64BranchRelaxation::splitBlockBeforeInstr(MachineInstr *MI) {
// Create a new MBB for the code after the OrigBB.
MachineBasicBlock *NewBB =
MF->CreateMachineBasicBlock(OrigBB->getBasicBlock());
- MachineFunction::iterator MBBI = OrigBB;
- ++MBBI;
- MF->insert(MBBI, NewBB);
+ MF->insert(++OrigBB->getIterator(), NewBB);
// Splice the instructions starting with MI over to NewBB.
NewBB->splice(NewBB->end(), OrigBB, MI, OrigBB->end());
@@ -432,7 +430,7 @@ bool AArch64BranchRelaxation::fixupConditionalBranch(MachineInstr *MI) {
MBB->replaceSuccessor(FBB, NewBB);
NewBB->addSuccessor(FBB);
}
- MachineBasicBlock *NextBB = std::next(MachineFunction::iterator(MBB));
+ MachineBasicBlock *NextBB = &*std::next(MachineFunction::iterator(MBB));
DEBUG(dbgs() << " Insert B to BB#" << DestBB->getNumber()
<< ", invert condition and change dest. to BB#"
OpenPOWER on IntegriCloud