[PATCH] D62749: [X86] remove derived method w/ same impl as base

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 13:50:59 PDT 2019

nickdesaulniers created this revision.
nickdesaulniers added reviewers: craig.topper, hfinkel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

While looking into issues with IfConverter, I noticed that
X86InstrInfo::isUnpredicatedTerminator matched its override base class'
implementation in TargetInstrInfo::isUnpredicatedTerminator.

  rG LLVM Github Monorepo



Index: llvm/lib/Target/X86/X86InstrInfo.h
--- llvm/lib/Target/X86/X86InstrInfo.h
+++ llvm/lib/Target/X86/X86InstrInfo.h
@@ -275,7 +275,6 @@
                                  const X86InstrFMA3Group &FMA3Group) const;
   // Branch analysis.
-  bool isUnpredicatedTerminator(const MachineInstr &MI) const override;
   bool isUnconditionalTailCall(const MachineInstr &MI) const override;
   bool canMakeTailCallConditional(SmallVectorImpl<MachineOperand> &Cond,
                                   const MachineInstr &TailCall) const override;
Index: llvm/lib/Target/X86/X86InstrInfo.cpp
--- llvm/lib/Target/X86/X86InstrInfo.cpp
+++ llvm/lib/Target/X86/X86InstrInfo.cpp
@@ -2160,17 +2160,6 @@
   return Imm;
-bool X86InstrInfo::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 X86InstrInfo::isUnconditionalTailCall(const MachineInstr &MI) const {
   switch (MI.getOpcode()) {
   case X86::TCRETURNdi:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62749.202477.patch
Type: text/x-patch
Size: 1279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190531/c05cb3c5/attachment-0001.bin>

More information about the llvm-commits mailing list