< prev index next >

src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp

Print this page
rev 50711 : ZGC: C2: Remove dead code

*** 759,773 **** if (barrier->can_be_eliminated()) { // Clone and pin the load for this barrier below the dominating // barrier: the load cannot be allowed to float above the // dominating barrier Node* load = in_val; ! Node* decode = NULL; ! if (load->is_DecodeN()) { ! decode = load; ! load = load->in(1); ! } if (load->is_Load()) { Node* new_load = load->clone(); Node* addp = new_load->in(MemNode::Address); assert(addp->is_AddP() || addp->is_Phi(), "bad address"); Node* cast = new CastPPNode(addp, igvn.type(addp), true); --- 759,769 ---- if (barrier->can_be_eliminated()) { // Clone and pin the load for this barrier below the dominating // barrier: the load cannot be allowed to float above the // dominating barrier Node* load = in_val; ! if (load->is_Load()) { Node* new_load = load->clone(); Node* addp = new_load->in(MemNode::Address); assert(addp->is_AddP() || addp->is_Phi(), "bad address"); Node* cast = new CastPPNode(addp, igvn.type(addp), true);
*** 784,801 **** cast->set_req(0, ctrl); igvn.transform(cast); new_load->set_req(MemNode::Address, cast); igvn.transform(new_load); ! Node* new_in_val = new_load; ! if (decode != NULL) { ! new_in_val = decode->clone(); ! new_in_val->set_req(1, new_load); ! igvn.transform(new_in_val); ! } ! ! igvn.replace_node(out_res, new_in_val); igvn.replace_node(out_ctrl, in_ctrl); return; } // cannot eliminate } --- 780,790 ---- cast->set_req(0, ctrl); igvn.transform(cast); new_load->set_req(MemNode::Address, cast); igvn.transform(new_load); ! igvn.replace_node(out_res, new_load); igvn.replace_node(out_ctrl, in_ctrl); return; } // cannot eliminate }
< prev index next >