[PATCH] D80696: [MLIR][BufferPlacement] Support functions that return Memref typed results

Ehsan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 28 07:35:17 PDT 2020


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


================
Comment at: mlir/test/lib/Transforms/TestBufferPlacement.cpp:89
+      BlockAndValueMapping mapping;
+      for (unsigned i = 0; i < oldBlock.getNumArguments(); i++)
+        mapping.map(oldBlock.getArgument(i), newBlock->getArgument(i));
----------------
dfki-ehna wrote:
> herhut wrote:
> > Before adding the extra arguments, we know that `oldBlock` and `newBlock` have the same number of arguments here. So why not do this earlier and use the version of map with iterators instead of the loop? Something like `mapping.map(oldBlock.getArguments(), newBlock->getArguments())`
> Thanks.
It also moved before adding the new arguments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80696





More information about the llvm-commits mailing list