[PATCH] D142084: [RFC][X86][MemFold] Upgrade the mechanism of auto-generated Memory Folding Table

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 02:00:24 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:130
+      bool RHSpseudo = RHS->TheDef->getValueAsBit("isPseudo");
+      if (LHSpseudo != RHSpseudo)
+        return LHSpseudo;
----------------
skan wrote:
> yubing wrote:
> > skan wrote:
> > > Why do we need to compare `isPseudo`?
> > I copy the code from "bool operator<(const X86FoldTableEntry &RHS) const {", 
> > @craig.topper , i saw the author of "bool operator<(const X86FoldTableEntry &RHS) const {" is you. do you still remember why we need to compare isPseudo here?
> I think it's a NFC change from me. If we remove this comparison, will any test fail?
It's the sort order for the enum in X86GenInstrInfo.inc. Instructions with isPseudo set are ordered before other instructions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142084/new/

https://reviews.llvm.org/D142084



More information about the llvm-commits mailing list