Lines Matching defs:ops
53 /// This struct stores finger prints of ops to determine whether the IR has
59 /// Compute finger prints of the given op and its nested ops.
284 /// pipelines work correctly regardless of the order in which ops are processed
320 /// rewriting ops on the worklist. Derived classes specify how ops are added
353 /// Process ops until the worklist is empty or `config.maxNumRewrites` is
372 /// The list of ops we are restricting our rewrites to. These include the
373 /// supplied set of ops as well as new ops created while rewriting those ops
487 // Try to fold this op. Do not fold constant ops. That would lead to an
644 // Scope (can be `nullptr`) was reached. Stop traveral and enqueue ops.
734 // Only ops that are within the configured scope are added to the worklist of
780 /// This driver simplfies all ops in a region.
788 /// Simplify ops inside `region` and simplify the region itself. Return
802 // Populate strict mode ops.
839 // `OperationFolder` CSE's constant ops (and may move them into parents
932 /// This driver simplfies a list of ops.
937 const GreedyRewriteConfig &config, ArrayRef<Operation *> ops,
940 /// Simplify `ops`. Return `success` if the transformation converged.
941 LogicalResult simplify(ArrayRef<Operation *> ops, bool *changed = nullptr) &&;
950 /// An optional set of ops that survived the rewrite. This set is populated
952 /// of ops.
959 const GreedyRewriteConfig &config, ArrayRef<Operation *> ops,
964 strictModeFilteredOps.insert(ops.begin(), ops.end());
968 survivingOps->insert(ops.begin(), ops.end());
972 LogicalResult MultiOpPatternRewriteDriver::simplify(ArrayRef<Operation *> ops,
975 for (Operation *op : ops)
978 // Process ops on the worklist.
986 /// Find the region that is the closest common ancestor of all given ops.
989 /// given list of ops.
990 static Region *findCommonAncestor(ArrayRef<Operation *> ops) {
991 assert(!ops.empty() && "expected at least one op");
993 if (ops.size() == 1)
994 return ops.front()->getParentRegion();
996 Region *region = ops.front()->getParentRegion();
997 ops = ops.drop_front();
998 int sz = ops.size();
1002 // Iterate over all remaining ops.
1005 if (region->findAncestorOpInRegion(*ops[pos]))
1016 ArrayRef<Operation *> ops, const FrozenRewritePatternSet &patterns,
1018 if (ops.empty()) {
1029 // there is a top-level op among `ops`.
1030 config.scope = findCommonAncestor(ops);
1032 // If a scope was provided, make sure that all ops are in scope.
1034 bool allOpsInScope = llvm::all_of(ops, [&](Operation *op) {
1037 assert(allOpsInScope && "ops must be within the specified scope");
1049 MultiOpPatternRewriteDriver driver(ops.front()->getContext(), patterns,
1050 config, ops,
1052 LogicalResult converged = std::move(driver).simplify(ops, changed);