src/share/vm/opto/node.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6934604 Cdiff src/share/vm/opto/node.cpp
src/share/vm/opto/node.cpp
Print this page
*** 65,75 ****
assert(bump >= 0 && bump < mod, "");
new_debug_idx += bump;
}
Compile::set_debug_idx(new_debug_idx);
set_debug_idx( new_debug_idx );
! assert(Compile::current()->unique() < (UINT_MAX - 1), "Node limit exceeded UINT_MAX");
if (BreakAtNode != 0 && (_debug_idx == BreakAtNode || (int)_idx == BreakAtNode)) {
tty->print_cr("BreakAtNode: _idx=%d _debug_idx=%d", _idx, _debug_idx);
BREAKPOINT;
}
#if OPTO_DU_ITERATOR_ASSERT
--- 65,76 ----
assert(bump >= 0 && bump < mod, "");
new_debug_idx += bump;
}
Compile::set_debug_idx(new_debug_idx);
set_debug_idx( new_debug_idx );
! assert(Compile::current()->unique() < (INT_MAX - 1), "Node limit exceeded INT_MAX");
! assert(Compile::current()->live_nodes() < (uint)MaxNodeLimit, "Live Node limit exceeded limit");
if (BreakAtNode != 0 && (_debug_idx == BreakAtNode || (int)_idx == BreakAtNode)) {
tty->print_cr("BreakAtNode: _idx=%d _debug_idx=%d", _idx, _debug_idx);
BREAKPOINT;
}
#if OPTO_DU_ITERATOR_ASSERT
*** 469,481 ****
//------------------------------clone------------------------------------------
// Clone a Node.
Node *Node::clone() const {
! Compile *compile = Compile::current();
uint s = size_of(); // Size of inherited Node
! Node *n = (Node*)compile->node_arena()->Amalloc_D(size_of() + _max*sizeof(Node*));
Copy::conjoint_words_to_lower((HeapWord*)this, (HeapWord*)n, s);
// Set the new input pointer array
n->_in = (Node**)(((char*)n)+s);
// Cannot share the old output pointer array, so kill it
n->_out = NO_OUT_ARRAY;
--- 470,482 ----
//------------------------------clone------------------------------------------
// Clone a Node.
Node *Node::clone() const {
! Compile* C = Compile::current();
uint s = size_of(); // Size of inherited Node
! Node *n = (Node*)C->node_arena()->Amalloc_D(size_of() + _max*sizeof(Node*));
Copy::conjoint_words_to_lower((HeapWord*)this, (HeapWord*)n, s);
// Set the new input pointer array
n->_in = (Node**)(((char*)n)+s);
// Cannot share the old output pointer array, so kill it
n->_out = NO_OUT_ARRAY;
*** 490,511 ****
Node *x = in(i);
n->_in[i] = x;
if (x != NULL) x->add_out(n);
}
if (is_macro())
! compile->add_macro_node(n);
if (is_expensive())
! compile->add_expensive_node(n);
! n->set_idx(compile->next_unique()); // Get new unique index as well
debug_only( n->verify_construction() );
NOT_PRODUCT(nodes_created++);
// Do not patch over the debug_idx of a clone, because it makes it
// impossible to break on the clone's moment of creation.
//debug_only( n->set_debug_idx( debug_idx() ) );
! compile->copy_node_notes_to(n, (Node*) this);
// MachNode clone
uint nopnds;
if (this->is_Mach() && (nopnds = this->as_Mach()->num_opnds()) > 0) {
MachNode *mach = n->as_Mach();
--- 491,512 ----
Node *x = in(i);
n->_in[i] = x;
if (x != NULL) x->add_out(n);
}
if (is_macro())
! C->add_macro_node(n);
if (is_expensive())
! C->add_expensive_node(n);
! n->set_idx(C->next_unique()); // Get new unique index as well
debug_only( n->verify_construction() );
NOT_PRODUCT(nodes_created++);
// Do not patch over the debug_idx of a clone, because it makes it
// impossible to break on the clone's moment of creation.
//debug_only( n->set_debug_idx( debug_idx() ) );
! C->copy_node_notes_to(n, (Node*) this);
// MachNode clone
uint nopnds;
if (this->is_Mach() && (nopnds = this->as_Mach()->num_opnds()) > 0) {
MachNode *mach = n->as_Mach();
*** 516,532 ****
MachOper **to = (MachOper **)((size_t)(&mach->_opnds) +
pointer_delta((const void*)from,
(const void*)(&mthis->_opnds), 1));
mach->_opnds = to;
for ( uint i = 0; i < nopnds; ++i ) {
! to[i] = from[i]->clone(compile);
}
}
// cloning CallNode may need to clone JVMState
if (n->is_Call()) {
! CallNode *call = n->as_Call();
! call->clone_jvms();
}
return n; // Return the clone
}
//---------------------------setup_is_top--------------------------------------
--- 517,532 ----
MachOper **to = (MachOper **)((size_t)(&mach->_opnds) +
pointer_delta((const void*)from,
(const void*)(&mthis->_opnds), 1));
mach->_opnds = to;
for ( uint i = 0; i < nopnds; ++i ) {
! to[i] = from[i]->clone(C);
}
}
// cloning CallNode may need to clone JVMState
if (n->is_Call()) {
! n->as_Call()->clone_jvms(C);
}
return n; // Return the clone
}
//---------------------------setup_is_top--------------------------------------
*** 809,818 ****
--- 809,833 ----
}
}
return nrep;
}
+ /**
+ * Replace input edges in the range pointing to 'old' node.
+ */
+ int Node::replace_edges_in_range(Node* old, Node* neww, int start, int end) {
+ if (old == neww) return 0; // nothing to do
+ uint nrep = 0;
+ for (int i = start; i < end; i++) {
+ if (in(i) == old) {
+ set_req(i, neww);
+ nrep++;
+ }
+ }
+ return nrep;
+ }
+
//-------------------------disconnect_inputs-----------------------------------
// NULL out all inputs to eliminate incoming Def-Use edges.
// Return the number of edges between 'n' and 'this'
int Node::disconnect_inputs(Node *n, Compile* C) {
int edges_to_n = 0;
src/share/vm/opto/node.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File