src/share/vm/opto/compile.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/compile.cpp Tue Mar 17 11:32:57 2015
--- new/src/share/vm/opto/compile.cpp Tue Mar 17 11:32:56 2015
*** 2809,2820 ****
--- 2809,2852 ----
}
#endif
break;
}
#ifdef _LP64
case Op_CastPP:
+ {
+ // Remove CastPP nodes to gain more freedom during scheduling
+ // but keep the dependency they encode as control or precedence
+ // edges (if control is set already) on memory operations.
+ ResourceMark rm;
+ Unique_Node_List wq;
+ wq.push(n);
+ for (uint next = 0; next < wq.size(); ++next) {
+ Node *m = wq.at(next);
+ for (DUIterator_Fast imax, i = m->fast_outs(imax); i < imax; i++) {
+ Node* use = m->fast_out(i);
+ if (use->is_Mem() || use->is_EncodeNarrowPtr()) {
+ if (use->in(0) == NULL) {
+ use->set_req(0, n->in(0));
+ } else {
+ use->add_prec(n->in(0));
+ }
+ } else if (use->in(0) == NULL) {
+ switch(use->Opcode()) {
+ case Op_AddP:
+ case Op_DecodeN:
+ case Op_DecodeNKlass:
+ case Op_CheckCastPP:
+ break;
+ default:
+ continue;
+ }
+ wq.push(use);
+ }
+ }
+ }
+ }
+ #ifdef _LP64
if (n->in(1)->is_DecodeN() && Matcher::gen_narrow_oop_implicit_null_checks()) {
Node* in1 = n->in(1);
const Type* t = n->bottom_type();
Node* new_in1 = in1->clone();
new_in1->as_DecodeN()->set_type(t);
*** 2844,2856 ****
--- 2876,2897 ----
n->subsume_by(new_in1, this);
if (in1->outcnt() == 0) {
in1->disconnect_inputs(NULL, this);
}
+ } else {
+ #endif
+ n->subsume_by(n->in(1), this);
+ if (n->outcnt() == 0) {
+ n->disconnect_inputs(NULL, this);
}
+ #ifdef _LP64
+ }
+ #endif
break;
+ #ifdef _LP64
case Op_CmpP:
// Do this transformation here to preserve CmpPNode::sub() and
// other TypePtr related Ideal optimizations (for example, ptr nullness).
if (n->in(1)->is_DecodeNarrowPtr() || n->in(2)->is_DecodeNarrowPtr()) {
Node* in1 = n->in(1);
src/share/vm/opto/compile.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File