[PATCH] D150633: [X86]check that Uses, Defs are same for entries in memory folding table
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 01:06:13 PDT 2023
skan added inline comments.
================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:112
+ void checkCorrectness() const {
+ // Check that Uses, Defs are same for entries in memory folding table
+ auto &RegInstRec = *RegInst->TheDef;
----------------
`,` -> `and`
This function is about entry only, not about the table. So I suggest
`Check that Uses and Defs are same after memory fold`
================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:120
+ if (ListOfUsesReg != ListOfUsesMem || ListOfDefsReg != ListOfDefsMem)
+ llvm::report_fatal_error(
+ "Uses/Defs couldn't be changed after folding " +
----------------
Drop `llvm::`?
================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:619-620
+#ifndef NDEBUG
+ // To Check if the instructions convertion in MemFoldTable change the Uses
+ // and Defs, it's wrong when we convert it and changed its Defs/Uses.
+ auto CheckMemFoldTable = [](const FoldTable &Table) -> void {
----------------
The logic here does not show anything about `Uses` or `Defs`. And it's self-explained, we can remove the comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150633/new/
https://reviews.llvm.org/D150633
More information about the llvm-commits
mailing list