src/share/vm/opto/idealGraphPrinter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7071307 Cdiff src/share/vm/opto/idealGraphPrinter.cpp

src/share/vm/opto/idealGraphPrinter.cpp

Print this page

        

*** 373,385 **** intptr_t IdealGraphPrinter::get_node_id(Node *n) { return (intptr_t)(n); } ! void IdealGraphPrinter::visit_node(Node *n, void *param) { ! if(param) { // Output edge intptr_t dest_id = get_node_id(n); for ( uint i = 0; i < n->len(); i++ ) { if ( n->in(i) ) { --- 373,385 ---- intptr_t IdealGraphPrinter::get_node_id(Node *n) { return (intptr_t)(n); } ! void IdealGraphPrinter::visit_node(Node *n, bool edges, VectorSet* temp_set) { ! if (edges) { // Output edge intptr_t dest_id = get_node_id(n); for ( uint i = 0; i < n->len(); i++ ) { if ( n->in(i) ) {
*** 597,617 **** } } #ifdef ASSERT if (node->debug_orig() != NULL) { stringStream dorigStream; Node* dorig = node->debug_orig(); ! if (dorig) { dorigStream.print("%d ", dorig->_idx); - Node* first = dorig; - dorig = first->debug_orig(); - while (dorig && dorig != first) { - dorigStream.print("%d ", dorig->_idx); - dorig = dorig->debug_orig(); } - } print_prop("debug_orig", dorigStream.as_string()); } #endif if (_chaitin && _chaitin != (PhaseChaitin *)0xdeadbeef) { --- 597,612 ---- } } #ifdef ASSERT if (node->debug_orig() != NULL) { + temp_set->Clear(); stringStream dorigStream; Node* dorig = node->debug_orig(); ! while (dorig && temp_set->test_set(dorig->_idx)) { dorigStream.print("%d ", dorig->_idx); } print_prop("debug_orig", dorigStream.as_string()); } #endif if (_chaitin && _chaitin != (PhaseChaitin *)0xdeadbeef) {
*** 627,637 **** tail(PROPERTIES_ELEMENT); tail(NODE_ELEMENT); } } ! void IdealGraphPrinter::walk_nodes(Node *start, void *param) { VectorSet visited(Thread::current()->resource_area()); GrowableArray<Node *> nodeStack(Thread::current()->resource_area(), 0, 0, NULL); nodeStack.push(start); --- 622,632 ---- tail(PROPERTIES_ELEMENT); tail(NODE_ELEMENT); } } ! void IdealGraphPrinter::walk_nodes(Node *start, bool edges, VectorSet* temp_set) { VectorSet visited(Thread::current()->resource_area()); GrowableArray<Node *> nodeStack(Thread::current()->resource_area(), 0, 0, NULL); nodeStack.push(start);
*** 648,658 **** } while(nodeStack.length() > 0) { Node *n = nodeStack.pop(); ! visit_node(n, param); if (_traverse_outs) { for (DUIterator i = n->outs(); n->has_out(i); i++) { Node* p = n->out(i); if (!visited.test_set(p->_idx)) { --- 643,653 ---- } while(nodeStack.length() > 0) { Node *n = nodeStack.pop(); ! visit_node(n, edges, temp_set); if (_traverse_outs) { for (DUIterator i = n->outs(); n->has_out(i); i++) { Node* p = n->out(i); if (!visited.test_set(p->_idx)) {
*** 687,702 **** begin_head(GRAPH_ELEMENT); print_attr(GRAPH_NAME_PROPERTY, (const char *)name); end_head(); head(NODES_ELEMENT); ! walk_nodes(node, NULL); tail(NODES_ELEMENT); head(EDGES_ELEMENT); ! walk_nodes(node, (void *)1); tail(EDGES_ELEMENT); if (C->cfg() != NULL) { head(CONTROL_FLOW_ELEMENT); for (uint i = 0; i < C->cfg()->_blocks.size(); i++) { Block *b = C->cfg()->_blocks[i]; --- 682,699 ---- begin_head(GRAPH_ELEMENT); print_attr(GRAPH_NAME_PROPERTY, (const char *)name); end_head(); + VectorSet temp_set(Thread::current()->resource_area()); + head(NODES_ELEMENT); ! walk_nodes(node, false, &temp_set); tail(NODES_ELEMENT); head(EDGES_ELEMENT); ! walk_nodes(node, true, &temp_set); tail(EDGES_ELEMENT); if (C->cfg() != NULL) { head(CONTROL_FLOW_ELEMENT); for (uint i = 0; i < C->cfg()->_blocks.size(); i++) { Block *b = C->cfg()->_blocks[i];
src/share/vm/opto/idealGraphPrinter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File