[PATCH] D78976: [TII] remove overrides of isUnpredicatedTerminator
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 18:20:48 PDT 2020
nickdesaulniers created this revision.
nickdesaulniers added reviewers: echristo, MaskRay, hfinkel.
Herald added subscribers: llvm-commits, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.
They all match the base implementation in
TargetInstrInfo::isUnpredicatedTerminator.
Follow up to D62749 <https://reviews.llvm.org/D62749>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78976
Files:
llvm/include/llvm/CodeGen/TargetInstrInfo.h
llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
llvm/lib/Target/MSP430/MSP430InstrInfo.h
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.h
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.h
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.h
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.h
@@ -360,8 +360,6 @@
// Predication support.
bool isPredicated(const MachineInstr &MI) const override;
- bool isUnpredicatedTerminator(const MachineInstr &MI) const override;
-
bool PredicateInstruction(MachineInstr &MI,
ArrayRef<MachineOperand> Pred) const override;
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -1435,17 +1435,6 @@
return false;
}
-bool PPCInstrInfo::isUnpredicatedTerminator(const MachineInstr &MI) const {
- if (!MI.isTerminator())
- return false;
-
- // Conditional branch is a special case.
- if (MI.isBranch() && !MI.isBarrier())
- return true;
-
- return !isPredicated(MI);
-}
-
bool PPCInstrInfo::PredicateInstruction(MachineInstr &MI,
ArrayRef<MachineOperand> Pred) const {
unsigned OpC = MI.getOpcode();
Index: llvm/lib/Target/MSP430/MSP430InstrInfo.h
===================================================================
--- llvm/lib/Target/MSP430/MSP430InstrInfo.h
+++ llvm/lib/Target/MSP430/MSP430InstrInfo.h
@@ -56,7 +56,6 @@
// Branch folding goodness
bool
reverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;
- bool isUnpredicatedTerminator(const MachineInstr &MI) const override;
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
MachineBasicBlock *&FBB,
SmallVectorImpl<MachineOperand> &Cond,
Index: llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
===================================================================
--- llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
+++ llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
@@ -160,18 +160,6 @@
return false;
}
-bool MSP430InstrInfo::isUnpredicatedTerminator(const MachineInstr &MI) const {
- if (!MI.isTerminator())
- return false;
-
- // Conditional branch is a special case.
- if (MI.isBranch() && !MI.isBarrier())
- return true;
- if (!MI.isPredicable())
- return true;
- return !isPredicated(MI);
-}
-
bool MSP430InstrInfo::analyzeBranch(MachineBasicBlock &MBB,
MachineBasicBlock *&TBB,
MachineBasicBlock *&FBB,
Index: llvm/include/llvm/CodeGen/TargetInstrInfo.h
===================================================================
--- llvm/include/llvm/CodeGen/TargetInstrInfo.h
+++ llvm/include/llvm/CodeGen/TargetInstrInfo.h
@@ -1316,7 +1316,7 @@
/// Returns true if the instruction is a
/// terminator instruction that has not been predicated.
- virtual bool isUnpredicatedTerminator(const MachineInstr &MI) const;
+ bool isUnpredicatedTerminator(const MachineInstr &MI) const;
/// Returns true if MI is an unconditional tail call.
virtual bool isUnconditionalTailCall(const MachineInstr &MI) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78976.260514.patch
Type: text/x-patch
Size: 3153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200428/d60609ae/attachment.bin>
More information about the llvm-commits
mailing list