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

Ehsan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 06:58:24 PDT 2020


dfki-ehna marked 8 inline comments as done.
dfki-ehna added inline comments.


================
Comment at: mlir/include/mlir/Transforms/BufferPlacement.h:117
     // Find the corresponding output buffer for each operand.
-    assert(numReturnValues <= numFuncArgs &&
+    assert(returnOp.getNumOperands() <= numFuncArgs &&
            "The number of operands of return operation is more than the "
----------------
herhut wrote:
> In the case where the return has non-memref operands, this can fail even for correct code as the non-memref operands do not require a function argument. Maybe add a test for such a case?
> 
> 
Thanks, you are right. I changed the assert and updated the target.addDynamicallyLegalOp<FuncOp>. A few new test cases were also added.


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