Lines Matching defs:region
38 /// We implicitly number each operation in the region and if an operation's
41 static void applyPatterns(Region ®ion,
48 for (const auto &op : enumerate(region.getOps())) {
86 static LogicalResult findOptimal(ModuleOp module, Region ®ion,
99 {0, std::distance(region.op_begin(), region.op_end())}};
103 // Duplicate the module for root node and locate the region in the copy.
104 if (failed(root->initialize(module, region)))
126 // At here, we have found an optimal path to reduce the given region. Retrieve
136 // Reduce the region through the optimal path.
139 applyPatterns(region, patterns, top->getStartRanges(), eraseOpNotInRange);
151 static LogicalResult findOptimal(ModuleOp module, Region ®ion,
159 if (failed(findOptimal<IteratorType>(module, region, /*patterns=*/{}, test,
164 return findOptimal<IteratorType>(module, region, patterns, test,
204 LogicalResult reduceOp(ModuleOp module, Region ®ion);
236 for (Region ®ion : op->getRegions())
237 if (!region.empty())
238 if (failed(reduceOp(module, region)))
241 for (Region ®ion : op->getRegions())
242 for (Operation &op : region.getOps())
248 LogicalResult ReductionTreePass::reduceOp(ModuleOp module, Region ®ion) {
253 module, region, reducerPatterns, test);