< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page
rev 54386 : 8221766: Load-reference barriers for Shenandoah


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




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


< prev index next >