mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-20 11:08:27 +00:00
Use MachineFunction::iterator instead of a MachineBasicBlock* because
FallThrough maybe == to MF.end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15372 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
31e155e610
commit
dd04583781
@ -172,8 +172,9 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB,
|
|||||||
MachineInstr *UncondBr = MI;
|
MachineInstr *UncondBr = MI;
|
||||||
MachineFunction::iterator FallThrough = MBB; ++FallThrough;
|
MachineFunction::iterator FallThrough = MBB; ++FallThrough;
|
||||||
|
|
||||||
MachineBasicBlock *UncondDest = MI->getOperand(0).getMachineBasicBlock();
|
MachineFunction::iterator UncondDest =
|
||||||
if (UncondDest == &*FallThrough) {
|
MI->getOperand(0).getMachineBasicBlock();
|
||||||
|
if (UncondDest == FallThrough) {
|
||||||
// Just delete the branch. This does not effect the CFG.
|
// Just delete the branch. This does not effect the CFG.
|
||||||
MBB->erase(UncondBr);
|
MBB->erase(UncondBr);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user