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

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 18:30:46 PDT 2023


skan added inline comments.


================
Comment at: llvm/test/TableGen/x86-auto-memfold.td:1
+// RUN: llvm-tblgen -gen-x86-fold-tables -asmwriternum=1 %p/../../lib/Target/X86/X86.td -I %p/../../include -I %p/../../lib/Target/X86/ -I %p/../../include/ -I %p/../../lib/Target/ --write-if-changed  -o %t1
+// RUN: cmp  --ignore-initial=0:568 %p/../../lib/Target/X86/X86MemFoldTables.inc %t1
----------------
dblaikie wrote:
> Could you update/fix this test to not depend on the real .td file - all the other tblgen tests include a small snippet/test case/example instead? (though the test was renamed in  35aeb321c005ed77ef5e5fb4f8dea69a81c81253)
@dblaikie Thank you for the suggestion! The test itself aims to expose the vulnerable rules in X86FoldTablesEmitter.cpp. Due to the complexity of X86ISA, even the folding rules are already complicated, it is hard to predict whether exceptions will occur when new ISAs are introduced. So unfortunately, we need the real .td file as input. I illustrated the usage of the test file in D147527 


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