< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.cpp

Print this page
rev 51408 : [mq]: cleanup-c1.patch

*** 244,269 **** } void LIRItem::load_item_force(LIR_Opr reg) { LIR_Opr r = result(); if (r != reg) { - _result = _gen->force_opr_to(r, reg); - } - } - - LIR_Opr LIRGenerator::force_opr_to(LIR_Opr op, LIR_Opr reg) { - if (op != reg) { #if !defined(ARM) && !defined(E500V2) ! if (op->type() != reg->type()) { // moves between different types need an intervening spill slot ! op = force_to_spill(op, reg->type()); } #endif ! __ move(op, reg); ! return reg; ! } else { ! return op; } } ciObject* LIRItem::get_jobject_constant() const { ObjectType* oc = type()->as_ObjectType(); --- 244,261 ---- } void LIRItem::load_item_force(LIR_Opr reg) { LIR_Opr r = result(); if (r != reg) { #if !defined(ARM) && !defined(E500V2) ! if (r->type() != reg->type()) { // moves between different types need an intervening spill slot ! r = _gen->force_to_spill(r, reg->type()); } #endif ! __ move(r, reg); ! _result = reg; } } ciObject* LIRItem::get_jobject_constant() const { ObjectType* oc = type()->as_ObjectType();
*** 1532,1550 **** tty->print_cr(" ###class not loaded at store_%s bci %d", x->is_static() ? "static" : "field", x->printable_bci()); } #endif - LIR_Opr obj = object.result(); - if (x->needs_null_check() && (needs_patching || MacroAssembler::needs_explicit_null_check(x->offset()))) { // Emit an explicit null check because the offset is too large. // If the class is not loaded and the object is NULL, we need to deoptimize to throw a // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code. ! __ null_check(obj, new CodeEmitInfo(info), /* deoptimize */ needs_patching); } DecoratorSet decorators = IN_HEAP; if (is_volatile) { decorators |= MO_SEQ_CST; --- 1524,1540 ---- tty->print_cr(" ###class not loaded at store_%s bci %d", x->is_static() ? "static" : "field", x->printable_bci()); } #endif if (x->needs_null_check() && (needs_patching || MacroAssembler::needs_explicit_null_check(x->offset()))) { // Emit an explicit null check because the offset is too large. // If the class is not loaded and the object is NULL, we need to deoptimize to throw a // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code. ! __ null_check(object.result(), new CodeEmitInfo(info), /* deoptimize */ needs_patching); } DecoratorSet decorators = IN_HEAP; if (is_volatile) { decorators |= MO_SEQ_CST;
*** 1650,1660 **** // Atomic operations are SEQ_CST by default decorators |= C1_READ_ACCESS; decorators |= C1_WRITE_ACCESS; decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0; LIRAccess access(this, decorators, base, offset, type); - new_value.load_item(); if (access.is_raw()) { return _barrier_set->BarrierSetC1::atomic_cmpxchg_at(access, cmp_value, new_value); } else { return _barrier_set->atomic_cmpxchg_at(access, cmp_value, new_value); } --- 1640,1649 ----
*** 1727,1742 **** tty->print_cr(" ###class not loaded at load_%s bci %d", x->is_static() ? "static" : "field", x->printable_bci()); } #endif - LIR_Opr obj = object.result(); bool stress_deopt = StressLoopInvariantCodeMotion && info && info->deoptimize_on_exception(); if (x->needs_null_check() && (needs_patching || MacroAssembler::needs_explicit_null_check(x->offset()) || stress_deopt)) { if (stress_deopt) { obj = new_register(T_OBJECT); __ move(LIR_OprFact::oopConst(NULL), obj); } // Emit an explicit null check because the offset is too large. --- 1716,1731 ---- tty->print_cr(" ###class not loaded at load_%s bci %d", x->is_static() ? "static" : "field", x->printable_bci()); } #endif bool stress_deopt = StressLoopInvariantCodeMotion && info && info->deoptimize_on_exception(); if (x->needs_null_check() && (needs_patching || MacroAssembler::needs_explicit_null_check(x->offset()) || stress_deopt)) { + LIR_Opr obj = object.result(); if (stress_deopt) { obj = new_register(T_OBJECT); __ move(LIR_OprFact::oopConst(NULL), obj); } // Emit an explicit null check because the offset is too large.
*** 2687,2697 **** if (method()->is_synchronized() && GenerateSynchronizationCode) { LIR_Opr lock = syncLockOpr(); __ load_stack_address_monitor(0, lock); CodeEmitInfo* info = new CodeEmitInfo(scope()->start()->state()->copy(ValueStack::StateBefore, SynchronizationEntryBCI), NULL, x->check_flag(Instruction::DeoptimizeOnException)); - obj = access_resolve_for_write(IN_HEAP | IS_NOT_NULL, obj, info); CodeStub* slow_path = new MonitorEnterStub(obj, lock, info); // receiver is guaranteed non-NULL so don't need CodeEmitInfo __ lock_object(syncTempOpr(), obj, lock, new_register(T_OBJECT), slow_path, NULL); } --- 2676,2685 ----
< prev index next >