[PATCH] D75965: [mlir] Add a simplifying wrapper for generateCopy and expose it.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 16:59:13 PDT 2020
rriddle added inline comments.
================
Comment at: mlir/include/mlir/Transforms/LoopUtils.h:18
+#include "mlir/Analysis/Utils.h"
#include "mlir/IR/Block.h"
----------------
Can you can forward declare the necessary things and move this header to the .cpp file?
================
Comment at: mlir/lib/Transforms/Utils/LoopUtils.cpp:1812
+ &result.sizeInBytes, &begin, &end);
+ if (failed(err)) {
+ return err;
----------------
Please drop trivial braces.
================
Comment at: mlir/lib/Transforms/Utils/LoopUtils.cpp:1820
+ } else {
+ assert(copyNests.size() == 1 &&
+ "Multiple copy nests generated appear for a single memref.");
----------------
Why not rework this?
assert(copyNests.size() <= 1 && ...);
result.copy_nest = copyNests.empty() ? nullptr : *copyNests.begin();
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75965/new/
https://reviews.llvm.org/D75965
More information about the llvm-commits
mailing list