[MLIR] Change return type of ParallelOp::getInductionVars to ValueRange.
authorAlexander Belyaev <pifon@google.com>
Mon, 6 Apr 2020 07:06:21 +0000 (09:06 +0200)
committerAlexander Belyaev <pifon@google.com>
Mon, 6 Apr 2020 08:11:02 +0000 (10:11 +0200)
commitc2d03e4ef1412e434ba62fd071f76b65e9f0e666
tree01ed478755b1e9c280d0cdbba7a3465587027627
parent6000478f394a774db581570e7873d8d2333507d1
[MLIR] Change return type of ParallelOp::getInductionVars to ValueRange.

The current return type sometimes leads to code like
to_vector<2>(ValueRange(loop.getInductionIvs())). It would be nice to
shorten it. Users who need access to Block::BlockArgListType (if there
are any), can always call getBody()->getArguments(); if needed.

Also remove getNumInductionVars(), since there is getNumLoops().

Differential Revision: https://reviews.llvm.org/D77526
mlir/include/mlir/Dialect/LoopOps/LoopOps.td
mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp