[all-commits] [llvm/llvm-project] d57653: [TableGen] Add a !listremove() bang operator

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Dec 9 07:03:34 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5765371092d0f3a6fa72f8f130bb75d1d90de08
      https://github.com/llvm/llvm-project/commit/d5765371092d0f3a6fa72f8f130bb75d1d90de08
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M llvm/docs/TableGen/ProgRef.rst
    M llvm/include/llvm/TableGen/Record.h
    M llvm/lib/TableGen/Record.cpp
    M llvm/lib/TableGen/TGLexer.cpp
    M llvm/lib/TableGen/TGLexer.h
    M llvm/lib/TableGen/TGParser.cpp
    A llvm/test/TableGen/listremove.td
    M llvm/utils/kate/llvm-tablegen.xml

  Log Message:
  -----------
  [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




More information about the All-commits mailing list