< prev index next >

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

Print this page




 118     Node* card_val = __ load( __ ctrl(), card_adr, TypeInt::BYTE, T_BYTE, adr_type);
 119     __ if_then(card_val, BoolTest::ne, zero);
 120   }
 121 
 122   // Smash zero into card
 123   if(!ct->scanned_concurrently()) {
 124     __ store(__ ctrl(), card_adr, zero, T_BYTE, adr_type, MemNode::unordered);
 125   } else {
 126     // Specialized path for CM store barrier
 127     __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, T_BYTE, adr_type);
 128   }
 129 
 130   if (UseCondCardMark) {
 131     __ end_if();
 132   }
 133 
 134   // Final sync IdealKit and GraphKit.
 135   kit->final_sync(ideal);
 136 }
 137 
 138 void CardTableBarrierSetC2::clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const {
 139   BarrierSetC2::clone(kit, src, dst, size, is_array);
 140   const TypePtr* raw_adr_type = TypeRawPtr::BOTTOM;
 141 
 142   // If necessary, emit some card marks afterwards.  (Non-arrays only.)
 143   bool card_mark = !is_array && !use_ReduceInitialCardMarks();
 144   if (card_mark) {
 145     assert(!is_array, "");
 146     // Put in store barrier for any and all oops we are sticking
 147     // into this object.  (We could avoid this if we could prove
 148     // that the object type contains no oop fields at all.)
 149     Node* no_particular_value = NULL;
 150     Node* no_particular_field = NULL;
 151     int raw_adr_idx = Compile::AliasIdxRaw;



 152     post_barrier(kit, kit->control(),
 153                  kit->memory(raw_adr_type),
 154                  dst,
 155                  no_particular_field,
 156                  raw_adr_idx,
 157                  no_particular_value,
 158                  T_OBJECT,
 159                  false);
 160   }
 161 }
 162 
 163 bool CardTableBarrierSetC2::use_ReduceInitialCardMarks() const {
 164   return ReduceInitialCardMarks;
 165 }
 166 
 167 bool CardTableBarrierSetC2::is_gc_barrier_node(Node* node) const {
 168   return ModRefBarrierSetC2::is_gc_barrier_node(node) || node->Opcode() == Op_StoreCM;
 169 }
 170 
 171 void CardTableBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const {




 118     Node* card_val = __ load( __ ctrl(), card_adr, TypeInt::BYTE, T_BYTE, adr_type);
 119     __ if_then(card_val, BoolTest::ne, zero);
 120   }
 121 
 122   // Smash zero into card
 123   if(!ct->scanned_concurrently()) {
 124     __ store(__ ctrl(), card_adr, zero, T_BYTE, adr_type, MemNode::unordered);
 125   } else {
 126     // Specialized path for CM store barrier
 127     __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, T_BYTE, adr_type);
 128   }
 129 
 130   if (UseCondCardMark) {
 131     __ end_if();
 132   }
 133 
 134   // Final sync IdealKit and GraphKit.
 135   kit->final_sync(ideal);
 136 }
 137 
 138 void CardTableBarrierSetC2::clone(GraphKit* kit, Node* src_base, Node* dst_base, Node* countx, bool is_array) const {
 139   BarrierSetC2::clone(kit, src_base, dst_base, countx, is_array);
 140   const TypePtr* raw_adr_type = TypeRawPtr::BOTTOM;
 141 
 142   // If necessary, emit some card marks afterwards.  (Non-arrays only.)
 143   bool card_mark = !is_array && !use_ReduceInitialCardMarks();
 144   if (card_mark) {
 145     assert(!is_array, "");
 146     // Put in store barrier for any and all oops we are sticking
 147     // into this object.  (We could avoid this if we could prove
 148     // that the object type contains no oop fields at all.)
 149     Node* no_particular_value = NULL;
 150     Node* no_particular_field = NULL;
 151     int raw_adr_idx = Compile::AliasIdxRaw;
 152     intptr_t unused_offset;
 153     Node* dst = AddPNode::Ideal_base_and_offset(dst_base, &kit->gvn(), unused_offset);
 154     assert(dst != NULL, "dst_base not an Addp");
 155     post_barrier(kit, kit->control(),
 156                  kit->memory(raw_adr_type),
 157                  dst,
 158                  no_particular_field,
 159                  raw_adr_idx,
 160                  no_particular_value,
 161                  T_OBJECT,
 162                  false);
 163   }
 164 }
 165 
 166 bool CardTableBarrierSetC2::use_ReduceInitialCardMarks() const {
 167   return ReduceInitialCardMarks;
 168 }
 169 
 170 bool CardTableBarrierSetC2::is_gc_barrier_node(Node* node) const {
 171   return ModRefBarrierSetC2::is_gc_barrier_node(node) || node->Opcode() == Op_StoreCM;
 172 }
 173 
 174 void CardTableBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const {


< prev index next >