forked from OSchip/llvm-project
[mlir][SCF] Apply suggested ClangTidy fixes.
This commit is contained in:
parent
4101aa130a
commit
c1d36e2304
|
@ -2406,7 +2406,8 @@ struct RemoveLoopInvariantArgsFromBeforeBlock
|
||||||
ValueRange yieldOpArgs = yieldOp->getOperands();
|
ValueRange yieldOpArgs = yieldOp->getOperands();
|
||||||
|
|
||||||
bool canSimplify = false;
|
bool canSimplify = false;
|
||||||
for (auto it : llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
|
for (const auto &it :
|
||||||
|
llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
|
||||||
auto index = static_cast<unsigned>(it.index());
|
auto index = static_cast<unsigned>(it.index());
|
||||||
Value initVal, yieldOpArg;
|
Value initVal, yieldOpArg;
|
||||||
std::tie(initVal, yieldOpArg) = it.value();
|
std::tie(initVal, yieldOpArg) = it.value();
|
||||||
|
@ -2437,7 +2438,8 @@ struct RemoveLoopInvariantArgsFromBeforeBlock
|
||||||
SmallVector<Value> newInitArgs, newYieldOpArgs;
|
SmallVector<Value> newInitArgs, newYieldOpArgs;
|
||||||
DenseMap<unsigned, Value> beforeBlockInitValMap;
|
DenseMap<unsigned, Value> beforeBlockInitValMap;
|
||||||
SmallVector<Location> newBeforeBlockArgLocs;
|
SmallVector<Location> newBeforeBlockArgLocs;
|
||||||
for (auto it : llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
|
for (const auto &it :
|
||||||
|
llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
|
||||||
auto index = static_cast<unsigned>(it.index());
|
auto index = static_cast<unsigned>(it.index());
|
||||||
Value initVal, yieldOpArg;
|
Value initVal, yieldOpArg;
|
||||||
std::tie(initVal, yieldOpArg) = it.value();
|
std::tie(initVal, yieldOpArg) = it.value();
|
||||||
|
@ -2574,7 +2576,7 @@ struct RemoveLoopInvariantValueYielded : public OpRewritePattern<WhileOp> {
|
||||||
SmallVector<Type> newAfterBlockType;
|
SmallVector<Type> newAfterBlockType;
|
||||||
DenseMap<unsigned, Value> condOpInitValMap;
|
DenseMap<unsigned, Value> condOpInitValMap;
|
||||||
SmallVector<Location> newAfterBlockArgLocs;
|
SmallVector<Location> newAfterBlockArgLocs;
|
||||||
for (auto it : llvm::enumerate(condOpArgs)) {
|
for (const auto &it : llvm::enumerate(condOpArgs)) {
|
||||||
auto index = static_cast<unsigned>(it.index());
|
auto index = static_cast<unsigned>(it.index());
|
||||||
Value condOpArg = it.value();
|
Value condOpArg = it.value();
|
||||||
// Those values not defined within `before` block will be considered as
|
// Those values not defined within `before` block will be considered as
|
||||||
|
|
Loading…
Reference in New Issue