}
MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {
- const TargetInstrInfo& TII = *getParent()->getTarget().getInstrInfo();
iterator I = end();
- while (I != begin() && TII.isTerminatorInstr((--I)->getOpcode()))
+ while (I != begin() && (--I)->getDesc()->isTerminator())
; /*noop */
- if (I != end() && !TII.isTerminatorInstr(I->getOpcode())) ++I;
+ if (I != end() && !I->getDesc()->isTerminator()) ++I;
return I;
}
MachineBasicBlock::iterator I = end();
while (I != begin()) {
--I;
- if (!(I->getInstrDescriptor()->Flags & M_TERMINATOR_FLAG)) break;
+ if (!I->getDesc()->isTerminator()) break;
// Scan the operands of this machine instruction, replacing any uses of Old
// with New.