Add a utility routine to check for unpredicated terminator instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37528 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2007-06-08 21:59:56 +00:00
parent 61718a6285
commit bfd2ec4a8e
6 changed files with 24 additions and 13 deletions
+7
View File
@@ -84,3 +84,10 @@ bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI,
}
return MadeChange;
}
bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
if (TID->Flags & M_TERMINATOR_FLAG)
return !isPredicated(MI);
return false;
}