< prev index next >

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

Print this page
rev 50537 : [mq]: rename_on_heap


  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/arraycopynode.hpp"
  27 #include "opto/graphKit.hpp"
  28 #include "opto/idealKit.hpp"
  29 #include "opto/narrowptrnode.hpp"
  30 #include "gc/shared/c2/modRefBarrierSetC2.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 Node* ModRefBarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) const {
  34   DecoratorSet decorators = access.decorators();
  35   GraphKit* kit = access.kit();
  36 
  37   const TypePtr* adr_type = access.addr().type();
  38   Node* adr = access.addr().node();
  39 
  40   bool on_array = (decorators & IN_HEAP_ARRAY) != 0;
  41   bool anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
  42   bool on_heap = (decorators & IN_HEAP) != 0;
  43   bool use_precise = on_array || anonymous;
  44 
  45   if (!access.is_oop() || (!on_heap && !anonymous)) {
  46     return BarrierSetC2::store_at_resolved(access, val);
  47   }
  48 
  49   uint adr_idx = kit->C->get_alias_index(adr_type);
  50   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
  51 
  52   pre_barrier(kit, true /* do_load */, kit->control(), access.base(), adr, adr_idx, val.node(),
  53               static_cast<const TypeOopPtr*>(val.type()), NULL /* pre_val */, access.type());
  54   Node* store = BarrierSetC2::store_at_resolved(access, val);
  55   post_barrier(kit, kit->control(), access.raw_access(), access.base(), adr, adr_idx, val.node(),
  56                access.type(), use_precise);
  57 
  58   return store;
  59 }
  60 
  61 Node* ModRefBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val,
  62                                                          Node* new_val, const Type* value_type) const {
  63   GraphKit* kit = access.kit();
  64 
  65   if (!access.is_oop()) {




  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/arraycopynode.hpp"
  27 #include "opto/graphKit.hpp"
  28 #include "opto/idealKit.hpp"
  29 #include "opto/narrowptrnode.hpp"
  30 #include "gc/shared/c2/modRefBarrierSetC2.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 Node* ModRefBarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) const {
  34   DecoratorSet decorators = access.decorators();
  35   GraphKit* kit = access.kit();
  36 
  37   const TypePtr* adr_type = access.addr().type();
  38   Node* adr = access.addr().node();
  39 
  40   bool on_array = (decorators & IN_HEAP_ARRAY) != 0;
  41   bool anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
  42   bool in_heap = (decorators & IN_HEAP) != 0;
  43   bool use_precise = on_array || anonymous;
  44 
  45   if (!access.is_oop() || (!in_heap && !anonymous)) {
  46     return BarrierSetC2::store_at_resolved(access, val);
  47   }
  48 
  49   uint adr_idx = kit->C->get_alias_index(adr_type);
  50   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
  51 
  52   pre_barrier(kit, true /* do_load */, kit->control(), access.base(), adr, adr_idx, val.node(),
  53               static_cast<const TypeOopPtr*>(val.type()), NULL /* pre_val */, access.type());
  54   Node* store = BarrierSetC2::store_at_resolved(access, val);
  55   post_barrier(kit, kit->control(), access.raw_access(), access.base(), adr, adr_idx, val.node(),
  56                access.type(), use_precise);
  57 
  58   return store;
  59 }
  60 
  61 Node* ModRefBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val,
  62                                                          Node* new_val, const Type* value_type) const {
  63   GraphKit* kit = access.kit();
  64 
  65   if (!access.is_oop()) {


< prev index next >