< prev index next >

src/share/vm/opto/addnode.cpp

Print this page
rev 13055 : Implement barriers for maintaining connection matrix.


 630       set_req(Offset, add->in(2));
 631       PhaseIterGVN *igvn = phase->is_IterGVN();
 632       if (add->outcnt() == 0 && igvn) {
 633         // add disconnected.
 634         igvn->_worklist.push((Node*)add);
 635       }
 636       return this;              // Made progress
 637     }
 638   }
 639 
 640   if (UseShenandoahGC &&
 641       in(Base) == in(AddPNode::Address) &&
 642       phase->type(in(Base)) == TypePtr::NULL_PTR) {
 643     if (can_reshape) {
 644       for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
 645         Node* u = fast_out(i);
 646         if (u->is_LoadStore()) {
 647           if (u->as_LoadStore()->adr_type() != NULL) {
 648             u->as_LoadStore()->set_adr_type(TypeRawPtr::BOTTOM);
 649           }








 650         }
 651 #ifdef ASSERT
 652         else if (u->is_Mem()) {
 653           assert(u->as_Mem()->raw_adr_type() == TypeOopPtr::BOTTOM, "bad slice");
 654           u->as_Mem()->set_raw_adr_type(TypeRawPtr::BOTTOM);
 655         } else if (u->Opcode() == Op_CallLeafNoFP && !strcmp(u->as_Call()->_name, "unsafe_arraycopy")) {
 656           assert(u->in(0) == NULL || u->in(0)->is_top() || u->in(0)->in(0) == NULL || u->in(0)->in(0)->is_top() ||
 657                  (u->in(0)->is_Proj() && u->in(0)->in(0)->is_MemBar()), "need membar before");
 658           Node* c = u->unique_ctrl_out();
 659           assert(c == NULL || c->is_Proj(), "need membar after");
 660           c = c->unique_ctrl_out();
 661           assert(c == NULL || c->is_MemBar(), "need membar after");
 662         } else if (u->Opcode() == Op_CallLeaf && !strcmp(u->as_Call()->_name, "g1_wb_pre")) {
 663           // leave it as it is
 664         } else {
 665           u->dump();
 666           ShouldNotReachHere();
 667         }
 668 #endif
 669       }




 630       set_req(Offset, add->in(2));
 631       PhaseIterGVN *igvn = phase->is_IterGVN();
 632       if (add->outcnt() == 0 && igvn) {
 633         // add disconnected.
 634         igvn->_worklist.push((Node*)add);
 635       }
 636       return this;              // Made progress
 637     }
 638   }
 639 
 640   if (UseShenandoahGC &&
 641       in(Base) == in(AddPNode::Address) &&
 642       phase->type(in(Base)) == TypePtr::NULL_PTR) {
 643     if (can_reshape) {
 644       for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
 645         Node* u = fast_out(i);
 646         if (u->is_LoadStore()) {
 647           if (u->as_LoadStore()->adr_type() != NULL) {
 648             u->as_LoadStore()->set_adr_type(TypeRawPtr::BOTTOM);
 649           }
 650         } else if (u->Opcode() == Op_CastP2X) {
 651           PhaseIterGVN *igvn = phase->is_IterGVN();
 652           phase->C->shenandoah_eliminate_matrix_update(u, igvn);
 653           --i; --imax;
 654         } else if (u->is_g1_wb_pre_call()) {
 655           PhaseIterGVN *igvn = phase->is_IterGVN();
 656           phase->C->shenandoah_eliminate_g1_wb_pre(u, igvn);
 657           --i; --imax;
 658         }
 659 #ifdef ASSERT
 660         else if (u->is_Mem()) {
 661           assert(u->as_Mem()->raw_adr_type() == TypeOopPtr::BOTTOM, "bad slice");
 662           u->as_Mem()->set_raw_adr_type(TypeRawPtr::BOTTOM);
 663         } else if (u->Opcode() == Op_CallLeafNoFP && !strcmp(u->as_Call()->_name, "unsafe_arraycopy")) {
 664           assert(u->in(0) == NULL || u->in(0)->is_top() || u->in(0)->in(0) == NULL || u->in(0)->in(0)->is_top() ||
 665                  (u->in(0)->is_Proj() && u->in(0)->in(0)->is_MemBar()), "need membar before");
 666           Node* c = u->unique_ctrl_out();
 667           assert(c == NULL || c->is_Proj(), "need membar after");
 668           c = c->unique_ctrl_out();
 669           assert(c == NULL || c->is_MemBar(), "need membar after");
 670         } else if (u->Opcode() == Op_CallLeaf && !strcmp(u->as_Call()->_name, "g1_wb_pre")) {
 671           // leave it as it is
 672         } else {
 673           u->dump();
 674           ShouldNotReachHere();
 675         }
 676 #endif
 677       }


< prev index next >