< prev index next >

src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp

Print this page




 190 
 191   if (do_load) {
 192     // We need to generate the load of the previous value
 193     assert(obj != NULL, "must have a base");
 194     assert(adr != NULL, "where are loading from?");
 195     assert(pre_val == NULL, "loaded already?");
 196     assert(val_type != NULL, "need a type");
 197 
 198     if (use_ReduceInitialCardMarks()
 199         && g1_can_remove_pre_barrier(kit, &kit->gvn(), adr, bt, alias_idx)) {
 200       return;
 201     }
 202 
 203   } else {
 204     // In this case both val_type and alias_idx are unused.
 205     assert(pre_val != NULL, "must be loaded already");
 206     // Nothing to be done if pre_val is null.
 207     if (pre_val->bottom_type() == TypePtr::NULL_PTR) return;
 208     assert(pre_val->bottom_type()->basic_type() == T_OBJECT, "or we shouldn't be here");
 209   }
 210   assert(bt == T_OBJECT, "or we shouldn't be here");
 211 
 212   IdealKit ideal(kit, true);
 213 
 214   Node* tls = __ thread(); // ThreadLocalStorage
 215 
 216   Node* no_base = __ top();
 217   Node* zero  = __ ConI(0);
 218   Node* zeroX = __ ConX(0);
 219 
 220   float likely  = PROB_LIKELY(0.999);
 221   float unlikely  = PROB_UNLIKELY(0.999);
 222 
 223   BasicType active_type = in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 ? T_INT : T_BYTE;
 224   assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 || in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "flag width");
 225 
 226   // Offsets into the thread
 227   const int marking_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
 228   const int index_offset   = in_bytes(G1ThreadLocalData::satb_mark_queue_index_offset());
 229   const int buffer_offset  = in_bytes(G1ThreadLocalData::satb_mark_queue_buffer_offset());
 230 




 190 
 191   if (do_load) {
 192     // We need to generate the load of the previous value
 193     assert(obj != NULL, "must have a base");
 194     assert(adr != NULL, "where are loading from?");
 195     assert(pre_val == NULL, "loaded already?");
 196     assert(val_type != NULL, "need a type");
 197 
 198     if (use_ReduceInitialCardMarks()
 199         && g1_can_remove_pre_barrier(kit, &kit->gvn(), adr, bt, alias_idx)) {
 200       return;
 201     }
 202 
 203   } else {
 204     // In this case both val_type and alias_idx are unused.
 205     assert(pre_val != NULL, "must be loaded already");
 206     // Nothing to be done if pre_val is null.
 207     if (pre_val->bottom_type() == TypePtr::NULL_PTR) return;
 208     assert(pre_val->bottom_type()->basic_type() == T_OBJECT, "or we shouldn't be here");
 209   }
 210   assert(bt == T_OBJECT || bt == T_VALUETYPE, "or we shouldn't be here");
 211 
 212   IdealKit ideal(kit, true);
 213 
 214   Node* tls = __ thread(); // ThreadLocalStorage
 215 
 216   Node* no_base = __ top();
 217   Node* zero  = __ ConI(0);
 218   Node* zeroX = __ ConX(0);
 219 
 220   float likely  = PROB_LIKELY(0.999);
 221   float unlikely  = PROB_UNLIKELY(0.999);
 222 
 223   BasicType active_type = in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 ? T_INT : T_BYTE;
 224   assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 || in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "flag width");
 225 
 226   // Offsets into the thread
 227   const int marking_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
 228   const int index_offset   = in_bytes(G1ThreadLocalData::satb_mark_queue_index_offset());
 229   const int buffer_offset  = in_bytes(G1ThreadLocalData::satb_mark_queue_buffer_offset());
 230 


< prev index next >