< prev index next >

src/hotspot/share/gc/shared/c2/modRefBarrierSetC2.cpp

Print this page

        

*** 30,53 **** #include "gc/shared/c2/modRefBarrierSetC2.hpp" #include "utilities/macros.hpp" Node* ModRefBarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) const { DecoratorSet decorators = access.decorators(); - GraphKit* kit = access.kit(); const TypePtr* adr_type = access.addr().type(); Node* adr = access.addr().node(); bool is_array = (decorators & IS_ARRAY) != 0; bool anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0; bool in_heap = (decorators & IN_HEAP) != 0; bool use_precise = is_array || anonymous; ! if (!access.is_oop() || (!in_heap && !anonymous)) { return BarrierSetC2::store_at_resolved(access, val); } uint adr_idx = kit->C->get_alias_index(adr_type); assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" ); pre_barrier(kit, true /* do_load */, kit->control(), access.base(), adr, adr_idx, val.node(), static_cast<const TypeOopPtr*>(val.type()), NULL /* pre_val */, access.type()); --- 30,57 ---- #include "gc/shared/c2/modRefBarrierSetC2.hpp" #include "utilities/macros.hpp" Node* ModRefBarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) const { DecoratorSet decorators = access.decorators(); const TypePtr* adr_type = access.addr().type(); Node* adr = access.addr().node(); bool is_array = (decorators & IS_ARRAY) != 0; bool anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0; bool in_heap = (decorators & IN_HEAP) != 0; bool use_precise = is_array || anonymous; + bool tighly_coupled_alloc = (decorators & C2_TIGHLY_COUPLED_ALLOC) != 0; ! if (!access.is_oop() || tighly_coupled_alloc || (!in_heap && !anonymous)) { return BarrierSetC2::store_at_resolved(access, val); } + assert(access.is_parse_access(), "entry not supported at optimization time"); + C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access); + GraphKit* kit = parse_access.kit(); + uint adr_idx = kit->C->get_alias_index(adr_type); assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" ); pre_barrier(kit, true /* do_load */, kit->control(), access.base(), adr, adr_idx, val.node(), static_cast<const TypeOopPtr*>(val.type()), NULL /* pre_val */, access.type());
*** 56,66 **** access.type(), use_precise); return store; } ! Node* ModRefBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val, Node* new_val, const Type* value_type) const { GraphKit* kit = access.kit(); if (!access.is_oop()) { return BarrierSetC2::atomic_cmpxchg_val_at_resolved(access, expected_val, new_val, value_type); --- 60,70 ---- access.type(), use_precise); return store; } ! Node* ModRefBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val, Node* new_val, const Type* value_type) const { GraphKit* kit = access.kit(); if (!access.is_oop()) { return BarrierSetC2::atomic_cmpxchg_val_at_resolved(access, expected_val, new_val, value_type);
*** 76,86 **** access.addr().node(), access.alias_idx(), new_val, T_OBJECT, true); return result; } ! Node* ModRefBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val, Node* new_val, const Type* value_type) const { GraphKit* kit = access.kit(); if (!access.is_oop()) { return BarrierSetC2::atomic_cmpxchg_bool_at_resolved(access, expected_val, new_val, value_type); --- 80,90 ---- access.addr().node(), access.alias_idx(), new_val, T_OBJECT, true); return result; } ! Node* ModRefBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val, Node* new_val, const Type* value_type) const { GraphKit* kit = access.kit(); if (!access.is_oop()) { return BarrierSetC2::atomic_cmpxchg_bool_at_resolved(access, expected_val, new_val, value_type);
*** 112,122 **** kit->final_sync(ideal); return load_store; } ! Node* ModRefBarrierSetC2::atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* value_type) const { GraphKit* kit = access.kit(); Node* result = BarrierSetC2::atomic_xchg_at_resolved(access, new_val, value_type); if (!access.is_oop()) { return result; --- 116,126 ---- kit->final_sync(ideal); return load_store; } ! Node* ModRefBarrierSetC2::atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const { GraphKit* kit = access.kit(); Node* result = BarrierSetC2::atomic_xchg_at_resolved(access, new_val, value_type); if (!access.is_oop()) { return result;
< prev index next >