[PATCH] D115404: [TargetInstrInfo][PowerPC] Remove virtual function that is only called from PPC specific code.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 15:49:05 PST 2021


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon, efriedma, nemanjai.
Herald added subscribers: shchenz, kbarton, hiraditya.
craig.topper requested review of this revision.
Herald added a project: LLVM.

There are two signatures of setSpecialOperandAttr in TargetInstrInfo.
One of them is only called from PPC's implementation of the other
signature and PPC has an override for it.

Remove it from TargetInstrInfo and make it a non-virtual method in
PPCInstrInfo.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115404

Files:
  llvm/include/llvm/CodeGen/TargetInstrInfo.h
  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
@@ -393,7 +393,7 @@
                              MachineInstr &NewMI1,
                              MachineInstr &NewMI2) const override;
 
-  void setSpecialOperandAttr(MachineInstr &MI, uint16_t Flags) const override;
+  void setSpecialOperandAttr(MachineInstr &MI, uint16_t Flags) const;
 
   bool isCoalescableExtInstr(const MachineInstr &MI,
                              Register &SrcReg, Register &DstReg,
Index: llvm/include/llvm/CodeGen/TargetInstrInfo.h
===================================================================
--- llvm/include/llvm/CodeGen/TargetInstrInfo.h
+++ llvm/include/llvm/CodeGen/TargetInstrInfo.h
@@ -1190,8 +1190,6 @@
                                      MachineInstr &NewMI1,
                                      MachineInstr &NewMI2) const {}
 
-  virtual void setSpecialOperandAttr(MachineInstr &MI, uint16_t Flags) const {}
-
   /// Return true when a target supports MachineCombiner.
   virtual bool useMachineCombiner() const { return false; }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115404.392962.patch
Type: text/x-patch
Size: 1188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211208/adef83ba/attachment.bin>


More information about the llvm-commits mailing list