[PATCH] D144154: [X86]Use Class to refactor ArithMetic td file in X86
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 19:34:30 PST 2023
skan added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstrArithmetic.td:478
+// UnaryOpM_mul - Instructions like "mul [mem]"
+class UnaryOpM_mul<bits<8> opcode, Format f, string mnemonic, X86TypeInfo info,
+ list<dag> pattern>
----------------
XinWang10 wrote:
> skan wrote:
> > Please make sure that a class is not defined when it is only used at one place, otherwise it's too overdesign.
> This is designed to be consistent with other class I wrote, it is unnecessary but make sense to me?
It doesn't make sense to me. If nested inheritance, e.g. A->B->C, when I need to know what actually C is, I have to look at both B and A. This kind of mind burden should be avoid for maintainers and developers when B is used only once.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144154/new/
https://reviews.llvm.org/D144154
More information about the llvm-commits
mailing list