683 if( m && cfg->_bbs[m->_idx] == this && !m->is_top() ) |
683 if( m && cfg->_bbs[m->_idx] == this && !m->is_top() ) |
684 local++; // One more block-local input |
684 local++; // One more block-local input |
685 } |
685 } |
686 ready_cnt[n->_idx] = local; // Count em up |
686 ready_cnt[n->_idx] = local; // Count em up |
687 |
687 |
|
688 #ifdef ASSERT |
|
689 if( UseConcMarkSweepGC || UseG1GC ) { |
|
690 if( n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_StoreCM ) { |
|
691 // Check the precedence edges |
|
692 for (uint prec = n->req(); prec < n->len(); prec++) { |
|
693 Node* oop_store = n->in(prec); |
|
694 if (oop_store != NULL) { |
|
695 assert(cfg->_bbs[oop_store->_idx]->_dom_depth <= this->_dom_depth, "oop_store must dominate card-mark"); |
|
696 } |
|
697 } |
|
698 } |
|
699 } |
|
700 #endif |
|
701 |
688 // A few node types require changing a required edge to a precedence edge |
702 // A few node types require changing a required edge to a precedence edge |
689 // before allocation. |
703 // before allocation. |
690 if( UseConcMarkSweepGC || UseG1GC ) { |
|
691 if( n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_StoreCM ) { |
|
692 // Note: Required edges with an index greater than oper_input_base |
|
693 // are not supported by the allocator. |
|
694 // Note2: Can only depend on unmatched edge being last, |
|
695 // can not depend on its absolute position. |
|
696 Node *oop_store = n->in(n->req() - 1); |
|
697 n->del_req(n->req() - 1); |
|
698 n->add_prec(oop_store); |
|
699 assert(cfg->_bbs[oop_store->_idx]->_dom_depth <= this->_dom_depth, "oop_store must dominate card-mark"); |
|
700 } |
|
701 } |
|
702 if( n->is_Mach() && n->req() > TypeFunc::Parms && |
704 if( n->is_Mach() && n->req() > TypeFunc::Parms && |
703 (n->as_Mach()->ideal_Opcode() == Op_MemBarAcquire || |
705 (n->as_Mach()->ideal_Opcode() == Op_MemBarAcquire || |
704 n->as_Mach()->ideal_Opcode() == Op_MemBarVolatile) ) { |
706 n->as_Mach()->ideal_Opcode() == Op_MemBarVolatile) ) { |
705 // MemBarAcquire could be created without Precedent edge. |
707 // MemBarAcquire could be created without Precedent edge. |
706 // del_req() replaces the specified edge with the last input edge |
708 // del_req() replaces the specified edge with the last input edge |