Lines Matching defs:edge
259 // Remove each edge in 'inEdges[id]'.
266 // Remove each edge in 'outEdges[id]'.
298 // Returns true iff there is an edge from node 'srcId' to node 'dstId' which
306 bool hasOutEdge = llvm::any_of(outEdges[srcId], [=](Edge &edge) {
307 return edge.id == dstId && (!value || edge.value == value);
309 bool hasInEdge = llvm::any_of(inEdges[dstId], [=](Edge &edge) {
310 return edge.id == srcId && (!value || edge.value == value);
315 // Adds an edge from node 'srcId' to node 'dstId' for 'value'.
326 // Removes an edge from node 'srcId' to node 'dstId' for 'value'.
355 // Worklist state is: <node-id, next-output-edge-index-to-visit>
372 // Get graph edge to traverse.
373 Edge edge = outEdges[idAndIndex.first][idAndIndex.second];
374 // Increment next output edge index for 'idAndIndex'.
376 // Add node at 'edge.id' to the worklist. We don't need to consider
379 bool afterDst = dstOp->isBeforeInBlock(getNode(edge.id)->op);
380 if (!afterDst && edge.id != idAndIndex.first)
381 worklist.push_back({edge.id, 0});
386 // Returns the input edge count for node 'id' and 'memref' from src nodes
402 // Returns the output edge count for node 'id' and 'memref' (if non-null),
403 // otherwise returns the total output edge count from node 'id'.
416 for (MemRefDependenceGraph::Edge edge : inEdges[id])
417 // By definition of edge, if the edge value is a non-memref value,
420 if (!isa<MemRefType>(edge.value.getType()))
421 definingNodes.insert(edge.id);
463 // dependence edge from 'srcNode'.
465 // dependence edge to 'dstNode'.
499 // Updates edge mappings from node 'srcId' to node 'dstId' after fusing them,
507 // For each edge in 'inEdges[srcId]': add new edge remapping to 'dstId'.
511 // Add edge from 'inEdge.id' to 'dstId' if it's not a private memref.
516 // For each edge in 'outEdges[srcId]': remove edge from 'srcId' to 'dstId'.
541 // Update edge mappings for nodes 'sibId' and 'dstId' to reflect fusion
544 // For each edge in 'inEdges[sibId]':
545 // *) Add new edge from source node 'inEdge.id' to 'dstNode'.
546 // *) Remove edge from source node 'inEdge.id' to 'sibNode'.
555 // For each edge in 'outEdges[sibId]' to node 'id'
556 // *) Add new edge from 'dstId' to 'outEdge.id'.
557 // *) Remove edge from 'sibId' to 'outEdge.id'.
582 // Calls 'callback' for each input edge incident to node 'id' which carries a
590 // Calls 'callback' for each output edge from node 'id' which carries a
598 // Calls 'callback' for each edge in 'edges' which carries a memref
602 for (const auto &edge : edges) {
603 // Skip if 'edge' is not a memref dependence edge.
604 if (!isa<MemRefType>(edge.value.getType()))
606 assert(nodes.count(edge.id) > 0);
607 // Skip if 'edge.id' is not a loop nest.
608 if (!isa<AffineForOp>(getNode(edge.id)->op))
610 // Visit current input edge 'edge'.
611 callback(edge);