Lines Matching defs:cluster
36 // A Value is an input of the cluster if it is an operand of an operation in the
37 // cluster and its defining operation is not in the cluster.
39 getInputsOfCluster(const llvm::SmallVector<Operation *, 8> &cluster) {
43 for (Operation *op : cluster) {
46 assert(inserted && "cluster contains duplicate operations");
49 for (Operation *op : cluster) {
53 // Skip if defining op is in the cluster.
65 createFuncFromCluster(OpBuilder &b, const SmallVector<Operation *, 8> &cluster,
67 SmallVector<Value, 4> inputs = getInputsOfCluster(cluster);
69 cluster.empty()
76 if (cluster.empty()) {
83 for (Operation *op : cluster)
93 // The operations in the cluster might be unsorted, which could be inconvenient
102 const DenseSet<Operation *> &cluster = it.second;
103 for (Operation *cOp : cluster)
108 // to and construct the new ordered cluster as it traverses.
140 const SmallVector<Operation *, 8> &cluster = clusters[shape];
148 auto pair = createFuncFromCluster(builder, cluster, shape, name, loc);
274 // The output of a cluster is the `shape`, and the inputs are the outputs of
278 DenseSet<Operation *> cluster;
292 cluster.insert(op);
301 clusters[shape] = std::move(cluster);