[PATCH] D74648: [mlir][DeclarativeParser] Add support for the TypesMatchWith trait.

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 12:04:04 PST 2020


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

Nice! Can we also update the doc regarding which traits are supported? Otherwise it's quite obscure for somebody to figure out what works and what not.



================
Comment at: mlir/tools/mlir-tblgen/OpFormatGen.cpp:1001
       ArrayRef<StringRef> values,
-      llvm::StringMap<const NamedTypeConstraint *> &variableTyResolver);
+      llvm::StringMap<std::pair<const NamedTypeConstraint *,
+                                Optional<StringRef>>> &variableTyResolver);
----------------
This pair is not trivial and it appears at lots of places. Might be worth it to define a struct to improve readability? Meta-programming is always difficult to understand; string concatenation to generate code too. :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74648





More information about the llvm-commits mailing list