[PATCH] D79329: [MLIR] Update the FunctionAndBlockSignatureConverter and NonVoidToVoidReturnOpConverter of Buffer Assignment

Stephan Herhut via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 18 02:38:18 PDT 2020


herhut requested changes to this revision.
herhut added inline comments.
This revision now requires changes to proceed.


================
Comment at: mlir/lib/Transforms/BufferPlacement.cpp:435
+  TypeRange resultTypes = funcType.getResults();
+  assert(llvm::none_of(resultTypes,
+                       [](Type type) { return type.isa<MemRefType>(); }) &&
----------------
Instead of an assert, can you fail the rewrite and report an error? That way, the program does not just crash and this also fails outside of debug builds.

Also, please add a test that the error is generated,


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79329





More information about the llvm-commits mailing list