[PATCH] D77526: [MLIR] Change return type of ParallelOp::getInductionVars to ValueRange.
Alexander Belyaev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 01:36:43 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc2d03e4ef141: [MLIR] Change return type of ParallelOp::getInductionVars to ValueRange. (authored by pifon2a).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77526/new/
https://reviews.llvm.org/D77526
Files:
mlir/include/mlir/Dialect/LoopOps/LoopOps.td
mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
Index: mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
===================================================================
--- mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
+++ mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
@@ -130,8 +130,8 @@
MLIRContext *ctx = parallelOp.getContext();
Builder b(ctx);
SmallVector<ParallelLoopDimMapping, 4> attrs;
- attrs.reserve(parallelOp.getNumInductionVars());
- for (int i = 0, e = parallelOp.getNumInductionVars(); i < e; ++i) {
+ attrs.reserve(parallelOp.getNumLoops());
+ for (int i = 0, e = parallelOp.getNumLoops(); i < e; ++i) {
attrs.push_back(getParallelLoopDimMappingAttr(
getHardwareIdForMapping(mappingLevel, i), b.getDimIdentityMap(),
b.getDimIdentityMap()));
Index: mlir/include/mlir/Dialect/LoopOps/LoopOps.td
===================================================================
--- mlir/include/mlir/Dialect/LoopOps/LoopOps.td
+++ mlir/include/mlir/Dialect/LoopOps/LoopOps.td
@@ -312,10 +312,7 @@
let extraClassDeclaration = [{
Block *getBody() { return ®ion().front(); }
- unsigned getNumInductionVars() {
- return getBody()->getNumArguments();
- }
- Block::BlockArgListType getInductionVars() {
+ ValueRange getInductionVars() {
return getBody()->getArguments();
}
unsigned getNumLoops() { return step().size(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77526.255252.patch
Type: text/x-patch
Size: 1378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200406/292c973c/attachment.bin>
More information about the llvm-commits
mailing list