[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
Mon May 15 23:03:02 PDT 2023


skan added inline comments.


================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:111
+#ifndef NDEBUG
+    bool checkCorrectness() const {
+      // Check that Uses, Defs are same for entries in memory folding table
----------------
Shouldn't we return void and abort (report_fatal_error) if there is sth wrong?


================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:624
+  // and Defs, it's wrong when we convert it and changed its Defs/Uses.
+    auto CheckMemFoldTable = [] (const FoldTable& table) -> void {
+      for (const auto &record: table){
----------------
Why there is an indent here?


================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:624
+  // and Defs, it's wrong when we convert it and changed its Defs/Uses.
+    auto CheckMemFoldTable = [] (const FoldTable& table) -> void {
+      for (const auto &record: table){
----------------
skan wrote:
> Why there is an indent here?
The first char of variable names should be capitalized.


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