[PATCH] D142084: [X86][MemFold] Upgrade the mechanism of auto-generated Memory Folding Table
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 02:31:34 PST 2023
skan added inline comments.
================
Comment at: llvm/test/TableGen/x86-auto-memfold.td:2
+// REQUIRES: shell
+// 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: cat %t1 | tr -d "\t\ " &> %t2
----------------
Drop "-asmwriternum=1" "-write-if-changed"
================
Comment at: llvm/test/TableGen/x86-auto-memfold.td:3
+// 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: cat %t1 | tr -d "\t\ " &> %t2
+// RUN: cat %p/../../lib/Target/X86/X86InstrFoldTables.def | tr -d "\t\ " &> %t3
----------------
Drop this line by using pipleline in the previous line.
================
Comment at: llvm/test/TableGen/x86-auto-memfold.td:4
+// RUN: cat %t1 | tr -d "\t\ " &> %t2
+// RUN: cat %p/../../lib/Target/X86/X86InstrFoldTables.def | tr -d "\t\ " &> %t3
+// RUN: cmp %t2 %t3
----------------
We should remove all the `\t` or space in INC file, don't use "tr" for it.
================
Comment at: llvm/test/TableGen/x86-auto-memfold.td:7
+
+// XFAIL: *
----------------
Drop the XFAIL, this patch should be merged after fp16 records are added.
================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:94
const ManualMapEntry ManualMapSet[] = {
- { "ADD16ri_DB", "ADD16mi", NO_UNFOLD },
- { "ADD16ri8_DB", "ADD16mi8", NO_UNFOLD },
- { "ADD16rr_DB", "ADD16mr", NO_UNFOLD },
- { "ADD32ri_DB", "ADD32mi", NO_UNFOLD },
- { "ADD32ri8_DB", "ADD32mi8", NO_UNFOLD },
- { "ADD32rr_DB", "ADD32mr", NO_UNFOLD },
- { "ADD64ri32_DB", "ADD64mi32", NO_UNFOLD },
- { "ADD64ri8_DB", "ADD64mi8", NO_UNFOLD },
- { "ADD64rr_DB", "ADD64mr", NO_UNFOLD },
- { "ADD8ri_DB", "ADD8mi", NO_UNFOLD },
- { "ADD8rr_DB", "ADD8mr", NO_UNFOLD },
- { "ADD16rr_DB", "ADD16rm", NO_UNFOLD },
- { "ADD32rr_DB", "ADD32rm", NO_UNFOLD },
- { "ADD64rr_DB", "ADD64rm", NO_UNFOLD },
- { "ADD8rr_DB", "ADD8rm", NO_UNFOLD },
- { "MMX_MOVD64from64rr", "MMX_MOVQ64mr", UNFOLD },
- { "MMX_MOVD64grr", "MMX_MOVD64mr", UNFOLD },
- { "MOVLHPSrr", "MOVHPSrm", NO_UNFOLD },
- { "PUSH16r", "PUSH16rmm", UNFOLD },
- { "PUSH32r", "PUSH32rmm", UNFOLD },
- { "PUSH64r", "PUSH64rmm", UNFOLD },
- { "TAILJMPr", "TAILJMPm", UNFOLD },
- { "TAILJMPr64", "TAILJMPm64", UNFOLD },
- { "TAILJMPr64_REX", "TAILJMPm64_REX", UNFOLD },
- { "VMOVLHPSZrr", "VMOVHPSZ128rm", NO_UNFOLD },
- { "VMOVLHPSrr", "VMOVHPSrm", NO_UNFOLD },
+ { "ADD16ri_DB", "ADD16mi", TB_NO_REVERSE },
+ { "ADD16ri8_DB", "ADD16mi8", TB_NO_REVERSE },
----------------
Move this into a .inc as a whitelist
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