[PATCH] D78434: [mlir] resolve types from attributes in assemblyFormat
    River Riddle via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr 28 11:17:21 PDT 2020
    
    
  
rriddle requested changes to this revision.
rriddle added a comment.
This revision now requires changes to proceed.
Looking really good.
================
Comment at: mlir/test/lib/Dialect/Test/TestOps.td:1250
+def FormatTypesMatchVarOp : TEST_Op<"format_types_match_var", [
+    TypesMatchWith<"result type matches operand", "value", "result", "$_self">
+  ]> {
----------------
Can you add an example for AllTypesMatch?
================
Comment at: mlir/tools/mlir-tblgen/OpFormatGen.cpp:295
     }
-    void setVariable(const NamedTypeConstraint *var,
+    void setResolver(llvm::PointerUnion<const NamedTypeConstraint*, const NamedAttribute*> varOrAttr,
                      Optional<StringRef> transformer) {
----------------
Please run clang-format.
================
Comment at: mlir/tools/mlir-tblgen/OpFormatGen.cpp:1692
     // Check to see if this value matches a resolved operand or result type.
     const NamedTypeConstraint *arg = findSeenArg(values[i]);
     if (!arg)
----------------
Can you add support for attributes here as well?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78434/new/
https://reviews.llvm.org/D78434
    
    
More information about the llvm-commits
mailing list