comparison src/share/vm/opto/lcm.cpp @ 1339:09ac706c2623

Merge
author asaha
date Wed, 24 Mar 2010 17:16:33 -0700
parents 1271af4ec18c
children c18cbe5936b8 3657cb01ffc5
comparison
equal deleted inserted replaced
1338:f5dd08ad65df 1339:09ac706c2623
118 case Op_LoadKlass: 118 case Op_LoadKlass:
119 case Op_LoadNKlass: 119 case Op_LoadNKlass:
120 case Op_LoadRange: 120 case Op_LoadRange:
121 case Op_LoadD_unaligned: 121 case Op_LoadD_unaligned:
122 case Op_LoadL_unaligned: 122 case Op_LoadL_unaligned:
123 assert(mach->in(2) == val, "should be address");
123 break; 124 break;
124 case Op_StoreB: 125 case Op_StoreB:
125 case Op_StoreC: 126 case Op_StoreC:
126 case Op_StoreCM: 127 case Op_StoreCM:
127 case Op_StoreD: 128 case Op_StoreD:
144 // embedded loads 145 // embedded loads
145 continue; 146 continue;
146 default: // Also check for embedded loads 147 default: // Also check for embedded loads
147 if( !mach->needs_anti_dependence_check() ) 148 if( !mach->needs_anti_dependence_check() )
148 continue; // Not an memory op; skip it 149 continue; // Not an memory op; skip it
150 {
151 // Check that value is used in memory address.
152 Node* base;
153 Node* index;
154 const MachOper* oper = mach->memory_inputs(base, index);
155 if (oper == NULL || oper == (MachOper*)-1) {
156 continue; // Not an memory op; skip it
157 }
158 if (val == base ||
159 val == index && val->bottom_type()->isa_narrowoop()) {
160 break; // Found it
161 } else {
162 continue; // Skip it
163 }
164 }
149 break; 165 break;
150 } 166 }
151 // check if the offset is not too high for implicit exception 167 // check if the offset is not too high for implicit exception
152 { 168 {
153 intptr_t offset = 0; 169 intptr_t offset = 0;
540 // done for oops since idealreg2debugmask takes care of debug info 556 // done for oops since idealreg2debugmask takes care of debug info
541 // references but there no way to handle oops differently than other 557 // references but there no way to handle oops differently than other
542 // pointers as far as the kill mask goes. 558 // pointers as far as the kill mask goes.
543 bool exclude_soe = op == Op_CallRuntime; 559 bool exclude_soe = op == Op_CallRuntime;
544 560
561 // If the call is a MethodHandle invoke, we need to exclude the
562 // register which is used to save the SP value over MH invokes from
563 // the mask. Otherwise this register could be used for
564 // deoptimization information.
565 if (op == Op_CallStaticJava) {
566 MachCallStaticJavaNode* mcallstaticjava = (MachCallStaticJavaNode*) mcall;
567 if (mcallstaticjava->_method_handle_invoke)
568 proj->_rout.OR(Matcher::method_handle_invoke_SP_save_mask());
569 }
570
545 // Fill in the kill mask for the call 571 // Fill in the kill mask for the call
546 for( OptoReg::Name r = OptoReg::Name(0); r < _last_Mach_Reg; r=OptoReg::add(r,1) ) { 572 for( OptoReg::Name r = OptoReg::Name(0); r < _last_Mach_Reg; r=OptoReg::add(r,1) ) {
547 if( !regs.Member(r) ) { // Not already defined by the call 573 if( !regs.Member(r) ) { // Not already defined by the call
548 // Save-on-call register? 574 // Save-on-call register?
549 if ((save_policy[r] == 'C') || 575 if ((save_policy[r] == 'C') ||
614 n->del_req(n->req() - 1); 640 n->del_req(n->req() - 1);
615 n->add_prec(oop_store); 641 n->add_prec(oop_store);
616 assert(cfg->_bbs[oop_store->_idx]->_dom_depth <= this->_dom_depth, "oop_store must dominate card-mark"); 642 assert(cfg->_bbs[oop_store->_idx]->_dom_depth <= this->_dom_depth, "oop_store must dominate card-mark");
617 } 643 }
618 } 644 }
619 if( n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_MemBarAcquire && 645 if( n->is_Mach() && n->req() > TypeFunc::Parms &&
620 n->req() > TypeFunc::Parms ) { 646 (n->as_Mach()->ideal_Opcode() == Op_MemBarAcquire ||
647 n->as_Mach()->ideal_Opcode() == Op_MemBarVolatile) ) {
621 // MemBarAcquire could be created without Precedent edge. 648 // MemBarAcquire could be created without Precedent edge.
622 // del_req() replaces the specified edge with the last input edge 649 // del_req() replaces the specified edge with the last input edge
623 // and then removes the last edge. If the specified edge > number of 650 // and then removes the last edge. If the specified edge > number of
624 // edges the last edge will be moved outside of the input edges array 651 // edges the last edge will be moved outside of the input edges array
625 // and the edge will be lost. This is why this code should be 652 // and the edge will be lost. This is why this code should be