< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page




3044 #endif
3045     // platform dependent reshaping of the address expression
3046     reshape_address(n->as_AddP());
3047     break;
3048   }
3049 
3050   case Op_CastPP: {
3051     // Remove CastPP nodes to gain more freedom during scheduling but
3052     // keep the dependency they encode as control or precedence edges
3053     // (if control is set already) on memory operations. Some CastPP
3054     // nodes don't have a control (don't carry a dependency): skip
3055     // those.
3056     if (n->in(0) != NULL) {
3057       ResourceMark rm;
3058       Unique_Node_List wq;
3059       wq.push(n);
3060       for (uint next = 0; next < wq.size(); ++next) {
3061         Node *m = wq.at(next);
3062         for (DUIterator_Fast imax, i = m->fast_outs(imax); i < imax; i++) {
3063           Node* use = m->fast_out(i);
3064           if (use->is_Mem() || use->is_EncodeNarrowPtr()) {
3065             use->ensure_control_or_add_prec(n->in(0));
3066           } else {
3067             switch(use->Opcode()) {
3068             case Op_AddP:
3069             case Op_DecodeN:
3070             case Op_DecodeNKlass:
3071             case Op_CheckCastPP:
3072             case Op_CastPP:
3073               wq.push(use);
3074               break;
3075             }
3076           }
3077         }
3078       }
3079     }
3080     const bool is_LP64 = LP64_ONLY(true) NOT_LP64(false);
3081     if (is_LP64 && n->in(1)->is_DecodeN() && Matcher::gen_narrow_oop_implicit_null_checks()) {
3082       Node* in1 = n->in(1);
3083       const Type* t = n->bottom_type();
3084       Node* new_in1 = in1->clone();




3044 #endif
3045     // platform dependent reshaping of the address expression
3046     reshape_address(n->as_AddP());
3047     break;
3048   }
3049 
3050   case Op_CastPP: {
3051     // Remove CastPP nodes to gain more freedom during scheduling but
3052     // keep the dependency they encode as control or precedence edges
3053     // (if control is set already) on memory operations. Some CastPP
3054     // nodes don't have a control (don't carry a dependency): skip
3055     // those.
3056     if (n->in(0) != NULL) {
3057       ResourceMark rm;
3058       Unique_Node_List wq;
3059       wq.push(n);
3060       for (uint next = 0; next < wq.size(); ++next) {
3061         Node *m = wq.at(next);
3062         for (DUIterator_Fast imax, i = m->fast_outs(imax); i < imax; i++) {
3063           Node* use = m->fast_out(i);
3064           if (use->is_Mem() || use->is_EncodeNarrowPtr() || use->is_ShenandoahBarrier()) {
3065             use->ensure_control_or_add_prec(n->in(0));
3066           } else {
3067             switch(use->Opcode()) {
3068             case Op_AddP:
3069             case Op_DecodeN:
3070             case Op_DecodeNKlass:
3071             case Op_CheckCastPP:
3072             case Op_CastPP:
3073               wq.push(use);
3074               break;
3075             }
3076           }
3077         }
3078       }
3079     }
3080     const bool is_LP64 = LP64_ONLY(true) NOT_LP64(false);
3081     if (is_LP64 && n->in(1)->is_DecodeN() && Matcher::gen_narrow_oop_implicit_null_checks()) {
3082       Node* in1 = n->in(1);
3083       const Type* t = n->bottom_type();
3084       Node* new_in1 = in1->clone();


< prev index next >