[PATCH] D48326: [RFC] "Alternative" matches for TableGen DAG patterns
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 20 07:15:48 PDT 2018
uweigand added a comment.
In https://reviews.llvm.org/D48326#1136809, @kparzysz wrote:
> I don't think that the new keyword is necessary. Why not have a new class `Patterns`that takes a list of input dag patterns (otherwise identical to the current `Pattern`), and matches when any of these inputs matches? Then you can have a `PatFrags` as an analogy to `PatFrag`.
I'm not sure I fully see how this would work yet, but I'll give it a try. Note that the primary motivation of my change was specifically to allow multiple matching patterns for the the main **instruction** pattern, i.e. the `Pattern` field of the `Instruction` class, and I'm not sure I see how your suggestion can work for this case, given that the main pattern does operate a bit differently from the `Pattern` case ...
Repository:
rL LLVM
https://reviews.llvm.org/D48326
More information about the llvm-commits
mailing list