void Print() { const_cast<Graph*>(graph_)->VisitNodeInputsFromEnd(this); }
- GenericGraphVisit::Control PreEdge(Node* from, int index, Node* to);
+ void PreEdge(Node* from, int index, Node* to);
private:
std::ostream& os_;
};
-GenericGraphVisit::Control JSONGraphEdgeWriter::PreEdge(Node* from, int index,
- Node* to) {
+void JSONGraphEdgeWriter::PreEdge(Node* from, int index, Node* to) {
if (first_edge_) {
first_edge_ = false;
} else {
}
os_ << "{\"source\":" << to->id() << ",\"target\":" << from->id()
<< ",\"index\":" << index << ",\"type\":\"" << edge_type << "\"}";
- return GenericGraphVisit::CONTINUE;
}
void Print();
GenericGraphVisit::Control Pre(Node* node);
- GenericGraphVisit::Control PreEdge(Node* from, int index, Node* to);
private:
void AnnotateNode(Node* node);
}
-GenericGraphVisit::Control GraphVisualizer::PreEdge(Node* from, int index,
- Node* to) {
- if (use_to_def_) return GenericGraphVisit::CONTINUE;
- // When going from def to use, only consider white -> other edges, which are
- // the dead nodes that use live nodes. We're probably not interested in
- // dead nodes that only use other dead nodes.
- if (white_nodes_.count(from) > 0) return GenericGraphVisit::CONTINUE;
- return GenericGraphVisit::SKIP;
-}
-
-
static bool IsLikelyBackEdge(Node* from, int index, Node* to) {
if (from->opcode() == IrOpcode::kPhi ||
from->opcode() == IrOpcode::kEffectPhi) {