src/share/vm/opto/matcher.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6709742 Cdiff src/share/vm/opto/matcher.cpp
src/share/vm/opto/matcher.cpp
Print this page
*** 273,282 ****
--- 273,296 ----
find_shared( C->root() );
find_shared( C->top() );
C->print_method("Before Matching");
+ // Create new ideal node ConP #NULL even if it does exist in old space
+ // to avoid false sharing if the corresponding mach node is not used.
+ // The corresponding mach node is only used in rare cases for derived
+ // pointers. Reuse existing ConP node only if it is shared.
+ Node* new_idealConP0 = ConNode::make(C, TypePtr::NULL_PTR);
+ Node* old_idealConP0 = NULL;
+ for( DUIterator_Fast jmax, j = C->root()->fast_outs(jmax); j < jmax; j++ ) {
+ Node* n = C->root()->fast_out(j);
+ if (n->Opcode() == Op_ConP && n->bottom_type() == TypePtr::NULL_PTR) {
+ old_idealConP0 = n;
+ break;
+ }
+ }
+
// Swap out to old-space; emptying new-space
Arena *old = C->node_arena()->move_contents(C->old_arena());
// Save debug and profile information for nodes in old space:
_old_node_note_array = C->node_note_array();
*** 314,324 ****
--- 328,351 ----
--j;
--jmax;
}
}
+ // Generate new mach node for ConP #NULL or use already generated.
+ if (old_idealConP0 != NULL && has_new_node(old_idealConP0)) {
+ _machConP0 = new_node(old_idealConP0)->as_Mach();
+ } else {
+ assert(new_idealConP0 != NULL, "sanity");
+ _machConP0 = match_tree(new_idealConP0);
+ // Don't set control, it will confuse GCM since there are no uses.
+ // The control will be set when this node is used first time
+ // in find_base_for_derived().
+ }
+ assert(_machConP0 != NULL, "");
+
C->set_root(xroot->is_Root() ? xroot->as_Root() : NULL);
+
#ifdef ASSERT
verify_new_nodes_only(xroot);
#endif
}
}
src/share/vm/opto/matcher.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File