Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/node.hpp @ 7196:2aff40cb4703
7092905: C2: Keep track of the number of dead nodes
Summary: keep an (almost) accurate running count of the reachable (live) flow graph nodes.
Reviewed-by: kvn, twisti, jrose, vlivanov
author | bharadwaj |
---|---|
date | Tue, 27 Nov 2012 17:24:15 -0800 |
parents | 8e47bac5643a |
children | a7114d3d712e |
comparison
equal
deleted
inserted
replaced
7195:2cd5e15048e6 | 7196:2aff40cb4703 |
---|---|
408 // Find first occurrence of n among my edges: | 408 // Find first occurrence of n among my edges: |
409 int find_edge(Node* n); | 409 int find_edge(Node* n); |
410 int replace_edge(Node* old, Node* neww); | 410 int replace_edge(Node* old, Node* neww); |
411 // NULL out all inputs to eliminate incoming Def-Use edges. | 411 // NULL out all inputs to eliminate incoming Def-Use edges. |
412 // Return the number of edges between 'n' and 'this' | 412 // Return the number of edges between 'n' and 'this' |
413 int disconnect_inputs(Node *n); | 413 int disconnect_inputs(Node *n, Compile *c); |
414 | 414 |
415 // Quickly, return true if and only if I am Compile::current()->top(). | 415 // Quickly, return true if and only if I am Compile::current()->top(). |
416 bool is_top() const { | 416 bool is_top() const { |
417 assert((this == (Node*) Compile::current()->top()) == (_out == NULL), ""); | 417 assert((this == (Node*) Compile::current()->top()) == (_out == NULL), ""); |
418 return (_out == NULL); | 418 return (_out == NULL); |
456 public: | 456 public: |
457 // Globally replace this node by a given new node, updating all uses. | 457 // Globally replace this node by a given new node, updating all uses. |
458 void replace_by(Node* new_node); | 458 void replace_by(Node* new_node); |
459 // Globally replace this node by a given new node, updating all uses | 459 // Globally replace this node by a given new node, updating all uses |
460 // and cutting input edges of old node. | 460 // and cutting input edges of old node. |
461 void subsume_by(Node* new_node) { | 461 void subsume_by(Node* new_node, Compile* c) { |
462 replace_by(new_node); | 462 replace_by(new_node); |
463 disconnect_inputs(NULL); | 463 disconnect_inputs(NULL, c); |
464 } | 464 } |
465 void set_req_X( uint i, Node *n, PhaseIterGVN *igvn ); | 465 void set_req_X( uint i, Node *n, PhaseIterGVN *igvn ); |
466 // Find the one non-null required input. RegionNode only | 466 // Find the one non-null required input. RegionNode only |
467 Node *nonnull_req() const; | 467 Node *nonnull_req() const; |
468 // Add or remove precedence edges | 468 // Add or remove precedence edges |