[PATCH] D101318: [TableGen] Add the !find bang operator

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 14:47:41 PDT 2021


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

In D101318#2717830 <https://reviews.llvm.org/D101318#2717830>, @Paul-C-Anagnostopoulos wrote:

> I added !find() to complement !substr(), so that TableGen would have the two most common string functions. I believe !find will be helpful with 'assert' as people begin adding assertions to TableGen files.

Fair enough - a general suggestion that these sort of tools aren't necessarily the place for adding a lot of speculative features. Usually we expect some in-tree motivating use case (one that you might/would implement/use) (potentially being used in a fairly-shortly-after follow-up commit) rather than building things that might be nice to have at some point.

So perhaps if you're adding features you could use them in the existing tablegen files to clean them up/improve them in some way to motivate the work, demonstrate how to use the features, and evangelize them (having the existing files using the new features as intended helps other people pick up on them when they go to modify/add/etc to the existing usage).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101318/new/

https://reviews.llvm.org/D101318



More information about the llvm-commits mailing list