[PATCH] D79729: [mlir] support materialization for 1-1 type conversions

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 04:25:36 PDT 2020


ftynse added a comment.

> (Sorry for the delay)

No worries! Flang folks seemed to need it, but they did not insist in the end.



================
Comment at: mlir/include/mlir/Transforms/DialectConversion.h:162
   /// On success, this function should populate 'result' with any new mappings.
   virtual LogicalResult convertSignatureArg(unsigned inputNo, Type type,
                                             SignatureConversion &result);
----------------
rriddle wrote:
> Can we remove the virtual here? That should enable removing the vtable completely.
I don't see any in-tree overrides of this, but let's do it as a separate commit in case somebody depends on it.


================
Comment at: mlir/lib/Transforms/DialectConversion.cpp:319
       Value castValue = argInfo->castValue;
-      assert(argInfo->newArgSize > 1 && castValue && "expected 1->N mapping");
+      assert(argInfo->newArgSize >= 1);
+      assert(castValue);
----------------
rriddle wrote:
> Are these duplicated from below?
Indeed, removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79729





More information about the llvm-commits mailing list