1732 Node* u = _out[i];
1733 if (u == NULL) {
1734 st->print("_ ");
1735 } else if (NotANode(u)) {
1736 st->print("NotANode ");
1737 } else {
1738 st->print("%c%d ", Compile::current()->node_arena()->contains(u) ? ' ' : 'o', u->_idx);
1739 }
1740 }
1741 st->print("]] ");
1742 }
1743
1744 //------------------------------dump_nodes-------------------------------------
1745 static void dump_nodes(const Node* start, int d, bool only_ctrl) {
1746 Node* s = (Node*)start; // remove const
1747 if (NotANode(s)) return;
1748
1749 uint depth = (uint)ABS(d);
1750 int direction = d;
1751 Compile* C = Compile::current();
1752 GrowableArray <Node *> nstack(C->unique());
1753
1754 nstack.append(s);
1755 int begin = 0;
1756 int end = 0;
1757 for(uint i = 0; i < depth; i++) {
1758 end = nstack.length();
1759 for(int j = begin; j < end; j++) {
1760 Node* tp = nstack.at(j);
1761 uint limit = direction > 0 ? tp->len() : tp->outcnt();
1762 for(uint k = 0; k < limit; k++) {
1763 Node* n = direction > 0 ? tp->in(k) : tp->raw_out(k);
1764
1765 if (NotANode(n)) continue;
1766 // do not recurse through top or the root (would reach unrelated stuff)
1767 if (n->is_Root() || n->is_top()) continue;
1768 if (only_ctrl && !n->is_CFG()) continue;
1769
1770 bool on_stack = nstack.contains(n);
1771 if (!on_stack) {
1772 nstack.append(n);
|
1732 Node* u = _out[i];
1733 if (u == NULL) {
1734 st->print("_ ");
1735 } else if (NotANode(u)) {
1736 st->print("NotANode ");
1737 } else {
1738 st->print("%c%d ", Compile::current()->node_arena()->contains(u) ? ' ' : 'o', u->_idx);
1739 }
1740 }
1741 st->print("]] ");
1742 }
1743
1744 //------------------------------dump_nodes-------------------------------------
1745 static void dump_nodes(const Node* start, int d, bool only_ctrl) {
1746 Node* s = (Node*)start; // remove const
1747 if (NotANode(s)) return;
1748
1749 uint depth = (uint)ABS(d);
1750 int direction = d;
1751 Compile* C = Compile::current();
1752 GrowableArray <Node *> nstack(C->live_nodes());
1753
1754 nstack.append(s);
1755 int begin = 0;
1756 int end = 0;
1757 for(uint i = 0; i < depth; i++) {
1758 end = nstack.length();
1759 for(int j = begin; j < end; j++) {
1760 Node* tp = nstack.at(j);
1761 uint limit = direction > 0 ? tp->len() : tp->outcnt();
1762 for(uint k = 0; k < limit; k++) {
1763 Node* n = direction > 0 ? tp->in(k) : tp->raw_out(k);
1764
1765 if (NotANode(n)) continue;
1766 // do not recurse through top or the root (would reach unrelated stuff)
1767 if (n->is_Root() || n->is_top()) continue;
1768 if (only_ctrl && !n->is_CFG()) continue;
1769
1770 bool on_stack = nstack.contains(n);
1771 if (!on_stack) {
1772 nstack.append(n);
|