Skip to content

Commit 1b9fdec

Browse files
[TII] remove overrides of isUnpredicatedTerminator
Summary: They all match the base implementation in TargetInstrInfo::isUnpredicatedTerminator. Follow up to D62749. Reviewers: echristo, MaskRay, hfinkel Reviewed By: echristo Subscribers: wuzish, nemanjai, hiraditya, kbarton, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D78976
1 parent 43d1d52 commit 1b9fdec

File tree

5 files changed

+1
-27
lines changed

5 files changed

+1
-27
lines changed

llvm/include/llvm/CodeGen/TargetInstrInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ class TargetInstrInfo : public MCInstrInfo {
13161316

13171317
/// Returns true if the instruction is a
13181318
/// terminator instruction that has not been predicated.
1319-
virtual bool isUnpredicatedTerminator(const MachineInstr &MI) const;
1319+
bool isUnpredicatedTerminator(const MachineInstr &MI) const;
13201320

13211321
/// Returns true if MI is an unconditional tail call.
13221322
virtual bool isUnconditionalTailCall(const MachineInstr &MI) const {

llvm/lib/Target/MSP430/MSP430InstrInfo.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,6 @@ reverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const {
160160
return false;
161161
}
162162

163-
bool MSP430InstrInfo::isUnpredicatedTerminator(const MachineInstr &MI) const {
164-
if (!MI.isTerminator())
165-
return false;
166-
167-
// Conditional branch is a special case.
168-
if (MI.isBranch() && !MI.isBarrier())
169-
return true;
170-
if (!MI.isPredicable())
171-
return true;
172-
return !isPredicated(MI);
173-
}
174-
175163
bool MSP430InstrInfo::analyzeBranch(MachineBasicBlock &MBB,
176164
MachineBasicBlock *&TBB,
177165
MachineBasicBlock *&FBB,

llvm/lib/Target/MSP430/MSP430InstrInfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class MSP430InstrInfo : public MSP430GenInstrInfo {
5656
// Branch folding goodness
5757
bool
5858
reverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;
59-
bool isUnpredicatedTerminator(const MachineInstr &MI) const override;
6059
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
6160
MachineBasicBlock *&FBB,
6261
SmallVectorImpl<MachineOperand> &Cond,

llvm/lib/Target/PowerPC/PPCInstrInfo.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,17 +1452,6 @@ bool PPCInstrInfo::isPredicated(const MachineInstr &MI) const {
14521452
return false;
14531453
}
14541454

1455-
bool PPCInstrInfo::isUnpredicatedTerminator(const MachineInstr &MI) const {
1456-
if (!MI.isTerminator())
1457-
return false;
1458-
1459-
// Conditional branch is a special case.
1460-
if (MI.isBranch() && !MI.isBarrier())
1461-
return true;
1462-
1463-
return !isPredicated(MI);
1464-
}
1465-
14661455
bool PPCInstrInfo::PredicateInstruction(MachineInstr &MI,
14671456
ArrayRef<MachineOperand> Pred) const {
14681457
unsigned OpC = MI.getOpcode();

llvm/lib/Target/PowerPC/PPCInstrInfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,6 @@ class PPCInstrInfo : public PPCGenInstrInfo {
364364
// Predication support.
365365
bool isPredicated(const MachineInstr &MI) const override;
366366

367-
bool isUnpredicatedTerminator(const MachineInstr &MI) const override;
368-
369367
bool PredicateInstruction(MachineInstr &MI,
370368
ArrayRef<MachineOperand> Pred) const override;
371369

0 commit comments

Comments
 (0)