15 : numRegions(op->getNumRegions()), nextRegion(0) {}
30 for (
Block &block : region) {
32 walk(&nestedOp, callback);
56 for (
Block &block : region) {
58 for (
Operation &nestedOp : llvm::make_early_inc_range(block))
59 if (
walk(&nestedOp, callback).wasInterrupted())
63 return callback(op, stage);
Block represents an ordered list of Operations.
Operation is the basic unit of execution within MLIR.
MutableArrayRef< Region > getRegions()
Returns the regions held by this operation.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
A utility result that is used to signal how to proceed with an ongoing walk:
bool wasSkipped() const
Returns true if the walk was skipped.
static WalkResult advance()
bool wasInterrupted() const
Returns true if the walk was interrupted.
static WalkResult interrupt()
A utility class to encode the current walk stage for "generic" walkers.
void walk(Operation *op, function_ref< void(Region *)> callback, WalkOrder order)
Walk all of the regions, blocks, or operations nested under (and including) the given operation.
Include the generated interface declarations.
static MutableArrayRef< Region > makeIterable(Operation &range)
Make operations iterable: return the list of regions.