HomePhabricator

[MLIR] Change return type of ParallelOp::getInductionVars to ValueRange.

Authored by Alexander Belyaev <pifon@google.com> on Apr 6 2020, 12:06 AM.

Description

[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