aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen/TGLexer.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2022-12-09 15:03:11 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2022-12-09 15:03:18 +0000
commitd5765371092d0f3a6fa72f8f130bb75d1d90de08 (patch)
treec44965f2ddebdb1429a488a563a82039957ecba2 /llvm/lib/TableGen/TGLexer.cpp
parentf3379feabe38fd3711b13ffcf6de4aab03b7ccdc (diff)
downloadllvm-d5765371092d0f3a6fa72f8f130bb75d1d90de08.zip
llvm-d5765371092d0f3a6fa72f8f130bb75d1d90de08.tar.gz
llvm-d5765371092d0f3a6fa72f8f130bb75d1d90de08.tar.bz2
[TableGen] Add a !listremove() bang operator
This patch proposes to add a !listremove() bang operator to allow us to prune list entries by removing any entries from the first list arg that are also contained in the second list arg. The particular use case I have in mind is for improved analysis of x86 scheduler models for which I'm hoping to start using the CodeGenProcModel 'Unsupported' features lists, which lists the ISA features a particular model DOESN'T support - with such a diverse and growing list of x86 ISAs, I don't want to have to update all these lists with every ISA change to every model - so I'm intending to keep a single central list of all x86 features, and then have the each model "remove" the features that it supports via a !listremove() - leaving just the unsupported ones. Differential Revision: https://reviews.llvm.org/D139642
Diffstat (limited to 'llvm/lib/TableGen/TGLexer.cpp')
-rw-r--r--llvm/lib/TableGen/TGLexer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/TableGen/TGLexer.cpp b/llvm/lib/TableGen/TGLexer.cpp
index 34a04e4..f2148b4 100644
--- a/llvm/lib/TableGen/TGLexer.cpp
+++ b/llvm/lib/TableGen/TGLexer.cpp
@@ -584,6 +584,7 @@ tgtok::TokKind TGLexer::LexExclaim() {
.Case("filter", tgtok::XFilter)
.Case("listconcat", tgtok::XListConcat)
.Case("listsplat", tgtok::XListSplat)
+ .Case("listremove", tgtok::XListRemove)
.Case("strconcat", tgtok::XStrConcat)
.Case("interleave", tgtok::XInterleave)
.Case("substr", tgtok::XSubstr)