< prev index next >

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

Print this page

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

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