comparison src/share/vm/opto/lcm.cpp @ 1162:d749b1813f40

Merge
author trims
date Fri, 15 Jan 2010 14:25:44 -0800
parents 1271af4ec18c
children c18cbe5936b8 3657cb01ffc5
comparison
equal deleted inserted replaced
1130:1bc68593a110 1162:d749b1813f40
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') ||