Allow target to disable if-converting predicable instructions. e.g. NEON instructions under ARM mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89541 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2009-11-21 06:20:26 +00:00
parent 2c4ceb177b
commit e54cb16308
2 changed files with 8 additions and 1 deletions

View File

@ -514,6 +514,13 @@ public:
return false;
}
/// isPredicable - Return true if the specified instruction can be predicated.
/// By default, this returns true for every instruction with a
/// PredicateOperand.
virtual bool isPredicable(MachineInstr *MI) const {
return MI->getDesc().isPredicable();
}
/// isSafeToMoveRegClassDefs - Return true if it's safe to move a machine
/// instruction that defines the specified register class.
virtual bool isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {

View File

@ -608,7 +608,7 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
if (TII->DefinesPredicate(I, PredDefs))
BBI.ClobbersPred = true;
if (!TID.isPredicable()) {
if (!TII->isPredicable(I)) {
BBI.IsUnpredicable = true;
return;
}