Lines Matching refs:node

20 #include "src/compiler/node-origin-table.h"
21 #include "src/compiler/node-properties.h"
22 #include "src/compiler/node.h"
266 static int SafeId(Node* node) { return node == nullptr ? -1 : node->id(); }
267 static const char* SafeMnemonic(Node* node) {
268 return node == nullptr ? "null" : node->op()->mnemonic();
297 for (Node* const node : all.reachable) PrintNode(node, live.IsLive(node));
300 for (Node* const node : all.reachable) PrintEdges(node);
306 void JSONGraphWriter::PrintNode(Node* node, bool is_live) {
313 node->op()->PrintTo(label, Operator::PrintVerbosity::kSilent);
314 node->op()->PrintTo(title, Operator::PrintVerbosity::kVerbose);
315 node->op()->PrintPropsTo(properties);
316 os_ << "{\"id\":" << SafeId(node) << ",\"label\":\"" << JSONEscaped(label)
321 IrOpcode::Value opcode = node->opcode();
323 os_ << ",\"rankInputs\":[0," << NodeProperties::FirstControlIndex(node)
325 os_ << ",\"rankWithInput\":[" << NodeProperties::FirstControlIndex(node)
329 os_ << ",\"rankInputs\":[" << NodeProperties::FirstControlIndex(node)
336 SourcePosition position = positions_->GetSourcePosition(node);
342 NodeOrigin origin = origins_->GetNodeOrigin(node);
347 os_ << ",\"opcode\":\"" << IrOpcode::Mnemonic(node->opcode()) << "\"";
349 << (NodeProperties::IsControl(node) ? "true" : "false");
350 os_ << ",\"opinfo\":\"" << node->op()->ValueInputCount() << " v "
351 << node->op()->EffectInputCount() << " eff "
352 << node->op()->ControlInputCount() << " ctrl in, "
353 << node->op()->ValueOutputCount() << " v "
354 << node->op()->EffectOutputCount() << " eff "
355 << node->op()->ControlOutputCount() << " ctrl out\"";
356 if (auto type_opt = GetType(node)) {
364 void JSONGraphWriter::PrintEdges(Node* node) {
365 for (int i = 0; i < node->InputCount(); i++) {
366 Node* input = node->InputAt(i);
368 PrintEdge(node, i, input);
396 base::Optional<Type> JSONGraphWriter::GetType(Node* node) {
397 if (!NodeProperties::IsTyped(node)) return base::nullopt;
398 return NodeProperties::GetType(node);
433 void PrintType(Node* node);
544 void GraphC1Visualizer::PrintInputs(Node* node) {
545 auto i = node->inputs().begin();
546 PrintInputs(&i, node->op()->ValueInputCount(), " ");
547 PrintInputs(&i, OperatorProperties::GetContextInputCount(node->op()),
549 PrintInputs(&i, OperatorProperties::GetFrameStateInputCount(node->op()),
551 PrintInputs(&i, node->op()->EffectInputCount(), " Eff:");
552 PrintInputs(&i, node->op()->ControlInputCount(), " Ctrl:");
556 void GraphC1Visualizer::PrintType(Node* node) {
557 if (NodeProperties::IsTyped(node)) {
558 Type type = NodeProperties::GetType(node);
646 Node* node = *it;
647 if (node->opcode() == IrOpcode::kPhi) continue;
648 int uses = node->UseCount();
651 PrintNode(node);
654 PrintType(node);
657 SourcePosition position = positions->GetSourcePosition(node);
832 // Do a post-order depth-first search on the RPO graph. For every node,
835 // - the node id
839 // - the node type (if it is typed)
841 // Post-order guarantees that all inputs of a node will be printed before
842 // the node itself, if there are no cycles. Any cycles are broken
872 // Print the node type, if any.
901 // Print the node type, if any.
926 Node* node = *it;
927 PrintScheduledNode(os, indent, node);