diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-12-06 02:49:06 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-12-06 02:49:06 +0000 |
commit | c1610bede171d7cd813e6ab0432c97be2df8c218 (patch) | |
tree | a5fe5c84fcc57f8644292d5a5f6758d3346a0186 /llvm/lib/CodeGen/MachineSSAUpdater.cpp | |
parent | d2971264c6cc7b3e310dd3aeee6477674ad34a7b (diff) | |
download | bcm5719-llvm-c1610bede171d7cd813e6ab0432c97be2df8c218.tar.gz bcm5719-llvm-c1610bede171d7cd813e6ab0432c97be2df8c218.zip |
Mix some minor misuse of MachineBasicBlock iterator.
llvm-svn: 145903
Diffstat (limited to 'llvm/lib/CodeGen/MachineSSAUpdater.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSSAUpdater.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineSSAUpdater.cpp b/llvm/lib/CodeGen/MachineSSAUpdater.cpp index 84d6df25397..8cb6112ffd9 100644 --- a/llvm/lib/CodeGen/MachineSSAUpdater.cpp +++ b/llvm/lib/CodeGen/MachineSSAUpdater.cpp @@ -81,7 +81,7 @@ unsigned LookForIdenticalPHI(MachineBasicBlock *BB, if (BB->empty()) return 0; - MachineBasicBlock::iterator I = BB->front(); + MachineBasicBlock::iterator I = BB->begin(); if (!I->isPHI()) return 0; @@ -182,7 +182,7 @@ unsigned MachineSSAUpdater::GetValueInMiddleOfBlock(MachineBasicBlock *BB) { return DupPHI; // Otherwise, we do need a PHI: insert one now. - MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->front(); + MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin(); MachineInstr *InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB, Loc, VRC, MRI, TII); @@ -311,7 +311,7 @@ public: /// Add it into the specified block and return the register. static unsigned CreateEmptyPHI(MachineBasicBlock *BB, unsigned NumPreds, MachineSSAUpdater *Updater) { - MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->front(); + MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin(); MachineInstr *PHI = InsertNewDef(TargetOpcode::PHI, BB, Loc, Updater->VRC, Updater->MRI, Updater->TII); |