Allow target to disable if-converting predicable instructions. e.g. NEON instructions under ARM mode.
llvm-svn: 89541
This commit is contained in:
parent
775d9c149d
commit
1f4062f194
|
@ -514,6 +514,13 @@ public:
|
||||||
return false;
|
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
|
/// isSafeToMoveRegClassDefs - Return true if it's safe to move a machine
|
||||||
/// instruction that defines the specified register class.
|
/// instruction that defines the specified register class.
|
||||||
virtual bool isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {
|
virtual bool isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {
|
||||||
|
|
|
@ -608,7 +608,7 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
|
||||||
if (TII->DefinesPredicate(I, PredDefs))
|
if (TII->DefinesPredicate(I, PredDefs))
|
||||||
BBI.ClobbersPred = true;
|
BBI.ClobbersPred = true;
|
||||||
|
|
||||||
if (!TID.isPredicable()) {
|
if (!TII->isPredicable(I)) {
|
||||||
BBI.IsUnpredicable = true;
|
BBI.IsUnpredicable = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue