hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
changeset 34185 ee71c590a456
parent 33638 ef49ed90010b
parent 34174 4db2fb26dc49
child 35071 a0910b1d3e0d
equal deleted inserted replaced
33813:4f376e851453 34185:ee71c590a456
   705     // of the method containing the jsr (because those exception
   705     // of the method containing the jsr (because those exception
   706     // handlers may contain ret instructions in some cases).
   706     // handlers may contain ret instructions in some cases).
   707     BlockBegin* block = bci2block()->at(bci);
   707     BlockBegin* block = bci2block()->at(bci);
   708     if (block != NULL && block == parent()->bci2block()->at(bci)) {
   708     if (block != NULL && block == parent()->bci2block()->at(bci)) {
   709       BlockBegin* new_block = new BlockBegin(block->bci());
   709       BlockBegin* new_block = new BlockBegin(block->bci());
   710 #ifndef PRODUCT
       
   711       if (PrintInitialBlockList) {
   710       if (PrintInitialBlockList) {
   712         tty->print_cr("CFG: cloned block %d (bci %d) as block %d for jsr",
   711         tty->print_cr("CFG: cloned block %d (bci %d) as block %d for jsr",
   713                       block->block_id(), block->bci(), new_block->block_id());
   712                       block->block_id(), block->bci(), new_block->block_id());
   714       }
   713       }
   715 #endif
       
   716       // copy data from cloned blocked
   714       // copy data from cloned blocked
   717       new_block->set_depth_first_number(block->depth_first_number());
   715       new_block->set_depth_first_number(block->depth_first_number());
   718       if (block->is_set(BlockBegin::parser_loop_header_flag)) new_block->set(BlockBegin::parser_loop_header_flag);
   716       if (block->is_set(BlockBegin::parser_loop_header_flag)) new_block->set(BlockBegin::parser_loop_header_flag);
   719       // Preserve certain flags for assertion checking
   717       // Preserve certain flags for assertion checking
   720       if (block->is_set(BlockBegin::subroutine_entry_flag)) new_block->set(BlockBegin::subroutine_entry_flag);
   718       if (block->is_set(BlockBegin::subroutine_entry_flag)) new_block->set(BlockBegin::subroutine_entry_flag);
  1436     call_register_finalizer();
  1434     call_register_finalizer();
  1437   }
  1435   }
  1438 
  1436 
  1439   bool need_mem_bar = false;
  1437   bool need_mem_bar = false;
  1440   if (method()->name() == ciSymbol::object_initializer_name() &&
  1438   if (method()->name() == ciSymbol::object_initializer_name() &&
  1441       (scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields()))) {
  1439       (scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields())
       
  1440                               || (support_IRIW_for_not_multiple_copy_atomic_cpu && scope()->wrote_volatile())
       
  1441      )){
  1442     need_mem_bar = true;
  1442     need_mem_bar = true;
  1443   }
  1443   }
  1444 
  1444 
  1445   // Check to see whether we are inlining. If so, Return
  1445   // Check to see whether we are inlining. If so, Return
  1446   // instructions become Gotos to the continuation point.
  1446   // instructions become Gotos to the continuation point.
  1552     scope()->set_wrote_final();
  1552     scope()->set_wrote_final();
  1553   }
  1553   }
  1554 
  1554 
  1555   if (code == Bytecodes::_putfield) {
  1555   if (code == Bytecodes::_putfield) {
  1556     scope()->set_wrote_fields();
  1556     scope()->set_wrote_fields();
       
  1557     if (field->is_volatile()) {
       
  1558       scope()->set_wrote_volatile();
       
  1559     }
  1557   }
  1560   }
  1558 
  1561 
  1559   const int offset = !needs_patching ? field->offset() : -1;
  1562   const int offset = !needs_patching ? field->offset() : -1;
  1560   switch (code) {
  1563   switch (code) {
  1561     case Bytecodes::_getstatic: {
  1564     case Bytecodes::_getstatic: {
  3783   bool continuation_existed = true;
  3786   bool continuation_existed = true;
  3784   if (cont == NULL) {
  3787   if (cont == NULL) {
  3785     cont = new BlockBegin(next_bci());
  3788     cont = new BlockBegin(next_bci());
  3786     // low number so that continuation gets parsed as early as possible
  3789     // low number so that continuation gets parsed as early as possible
  3787     cont->set_depth_first_number(0);
  3790     cont->set_depth_first_number(0);
  3788 #ifndef PRODUCT
       
  3789     if (PrintInitialBlockList) {
  3791     if (PrintInitialBlockList) {
  3790       tty->print_cr("CFG: created block %d (bci %d) as continuation for inline at bci %d",
  3792       tty->print_cr("CFG: created block %d (bci %d) as continuation for inline at bci %d",
  3791                     cont->block_id(), cont->bci(), bci());
  3793                     cont->block_id(), cont->bci(), bci());
  3792     }
  3794     }
  3793 #endif
       
  3794     continuation_existed = false;
  3795     continuation_existed = false;
  3795   }
  3796   }
  3796   // Record number of predecessors of continuation block before
  3797   // Record number of predecessors of continuation block before
  3797   // inlining, to detect if inlined method has edges to its
  3798   // inlining, to detect if inlined method has edges to its
  3798   // continuation after inlining.
  3799   // continuation after inlining.