forked from OSchip/llvm-project
[mlir] remove unnecessary statements in test
A previous commit (f2b94bd
) added some unnecessary statements that
dereferenced operations only to get the operations back. This patch
removes the unnecessary statements.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D129913
This commit is contained in:
parent
f187948162
commit
179588ea39
|
@ -131,10 +131,8 @@ struct TestGenericIRBlockVisitorInterruptPass
|
|||
|
||||
auto walker = [&](Block *block) {
|
||||
for (Operation &op : *block)
|
||||
for (OpResult result : op.getResults())
|
||||
if (Operation *definingOp = result.getDefiningOp())
|
||||
if (definingOp->getAttrOfType<BoolAttr>("interrupt"))
|
||||
return WalkResult::interrupt();
|
||||
if (op.getAttrOfType<BoolAttr>("interrupt"))
|
||||
return WalkResult::interrupt();
|
||||
|
||||
llvm::outs() << "step " << stepNo++ << "\n";
|
||||
return WalkResult::advance();
|
||||
|
@ -163,12 +161,9 @@ struct TestGenericIRRegionVisitorInterruptPass
|
|||
int stepNo = 0;
|
||||
|
||||
auto walker = [&](Region *region) {
|
||||
for (Block &block : *region)
|
||||
for (Operation &op : block)
|
||||
for (OpResult result : op.getResults())
|
||||
if (Operation *definingOp = result.getDefiningOp())
|
||||
if (definingOp->getAttrOfType<BoolAttr>("interrupt"))
|
||||
return WalkResult::interrupt();
|
||||
for (Operation &op : region->getOps())
|
||||
if (op.getAttrOfType<BoolAttr>("interrupt"))
|
||||
return WalkResult::interrupt();
|
||||
|
||||
llvm::outs() << "step " << stepNo++ << "\n";
|
||||
return WalkResult::advance();
|
||||
|
|
Loading…
Reference in New Issue