< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp

Print this page
rev 53399 : Redo: Avoid stub when calling to write-barrier from C2, remove all related code


 342       } __ end_if();  // (!index)
 343     } __ end_if();  // (pre_val != NULL)
 344   } __ end_if();  // (!marking)
 345 
 346   // Final sync IdealKit and GraphKit.
 347   kit->final_sync(ideal);
 348 
 349   if (ShenandoahSATBBarrier && adr != NULL) {
 350     Node* c = kit->control();
 351     Node* call = c->in(1)->in(1)->in(1)->in(0);
 352     assert(is_shenandoah_wb_pre_call(call), "shenandoah_wb_pre call expected");
 353     call->add_req(adr);
 354   }
 355 }
 356 
 357 bool ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call(Node* call) {
 358   return call->is_CallLeaf() &&
 359          call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_field_pre_entry);
 360 }
 361 





 362 bool ShenandoahBarrierSetC2::is_shenandoah_marking_if(PhaseTransform *phase, Node* n) {
 363   if (n->Opcode() != Op_If) {
 364     return false;
 365   }
 366 
 367   Node* bol = n->in(1);
 368   assert(bol->is_Bool(), "");
 369   Node* cmpx = bol->in(1);
 370   if (bol->as_Bool()->_test._test == BoolTest::ne &&
 371       cmpx->is_Cmp() && cmpx->in(2) == phase->intcon(0) &&
 372       is_shenandoah_state_load(cmpx->in(1)->in(1)) &&
 373       cmpx->in(1)->in(2)->is_Con() &&
 374       cmpx->in(1)->in(2) == phase->intcon(ShenandoahHeap::MARKING)) {
 375     return true;
 376   }
 377 
 378   return false;
 379 }
 380 
 381 bool ShenandoahBarrierSetC2::is_shenandoah_state_load(Node* n) {




 342       } __ end_if();  // (!index)
 343     } __ end_if();  // (pre_val != NULL)
 344   } __ end_if();  // (!marking)
 345 
 346   // Final sync IdealKit and GraphKit.
 347   kit->final_sync(ideal);
 348 
 349   if (ShenandoahSATBBarrier && adr != NULL) {
 350     Node* c = kit->control();
 351     Node* call = c->in(1)->in(1)->in(1)->in(0);
 352     assert(is_shenandoah_wb_pre_call(call), "shenandoah_wb_pre call expected");
 353     call->add_req(adr);
 354   }
 355 }
 356 
 357 bool ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call(Node* call) {
 358   return call->is_CallLeaf() &&
 359          call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_field_pre_entry);
 360 }
 361 
 362 bool ShenandoahBarrierSetC2::is_shenandoah_wb_call(Node* call) {
 363   return call->is_CallLeaf() &&
 364          call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_JRT);
 365 }
 366 
 367 bool ShenandoahBarrierSetC2::is_shenandoah_marking_if(PhaseTransform *phase, Node* n) {
 368   if (n->Opcode() != Op_If) {
 369     return false;
 370   }
 371 
 372   Node* bol = n->in(1);
 373   assert(bol->is_Bool(), "");
 374   Node* cmpx = bol->in(1);
 375   if (bol->as_Bool()->_test._test == BoolTest::ne &&
 376       cmpx->is_Cmp() && cmpx->in(2) == phase->intcon(0) &&
 377       is_shenandoah_state_load(cmpx->in(1)->in(1)) &&
 378       cmpx->in(1)->in(2)->is_Con() &&
 379       cmpx->in(1)->in(2) == phase->intcon(ShenandoahHeap::MARKING)) {
 380     return true;
 381   }
 382 
 383   return false;
 384 }
 385 
 386 bool ShenandoahBarrierSetC2::is_shenandoah_state_load(Node* n) {


< prev index next >