< prev index next >
src/share/vm/opto/node.cpp
Print this page
@@ -519,10 +519,15 @@
}
if (is_macro())
C->add_macro_node(n);
if (is_expensive())
C->add_expensive_node(n);
+ // If the cloned node is a range check dependent CastII, add it to the list.
+ CastIINode* cast = n->isa_CastII();
+ if (cast != NULL && cast->has_range_check()) {
+ C->add_range_check_cast(cast);
+ }
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
@@ -647,10 +652,15 @@
compile->remove_macro_node(this);
}
if (is_expensive()) {
compile->remove_expensive_node(this);
}
+ CastIINode* cast = isa_CastII();
+ if (cast != NULL && cast->has_range_check()) {
+ compile->remove_range_check_cast(cast);
+ }
+
if (is_SafePoint()) {
as_SafePoint()->delete_replaced_nodes();
}
#ifdef ASSERT
// We will not actually delete the storage, but we'll make the node unusable.
@@ -1342,10 +1352,14 @@
igvn->C->remove_macro_node(dead);
}
if (dead->is_expensive()) {
igvn->C->remove_expensive_node(dead);
}
+ CastIINode* cast = dead->isa_CastII();
+ if (cast != NULL && cast->has_range_check()) {
+ igvn->C->remove_range_check_cast(cast);
+ }
igvn->C->record_dead_node(dead->_idx);
// Kill all inputs to the dead guy
for (uint i=0; i < dead->req(); i++) {
Node *n = dead->in(i); // Get input to dead guy
if (n != NULL && !n->is_top()) { // Input is valid?
< prev index next >