hotspot/src/share/vm/opto/parse1.cpp
changeset 35157 1a5fa0acb08b
parent 35071 a0910b1d3e0d
child 36336 7006dd73b206
equal deleted inserted replaced
35155:db692d3ebbcc 35157:1a5fa0acb08b
   960   if (method()->is_initializer() &&
   960   if (method()->is_initializer() &&
   961         (wrote_final() ||
   961         (wrote_final() ||
   962            PPC64_ONLY(wrote_volatile() ||)
   962            PPC64_ONLY(wrote_volatile() ||)
   963            (AlwaysSafeConstructors && wrote_fields()))) {
   963            (AlwaysSafeConstructors && wrote_fields()))) {
   964     _exits.insert_mem_bar(Op_MemBarRelease, alloc_with_final());
   964     _exits.insert_mem_bar(Op_MemBarRelease, alloc_with_final());
       
   965 
       
   966     // If Memory barrier is created for final fields write
       
   967     // and allocation node does not escape the initialize method,
       
   968     // then barrier introduced by allocation node can be removed.
       
   969     if (DoEscapeAnalysis && alloc_with_final()) {
       
   970       AllocateNode *alloc = AllocateNode::Ideal_allocation(alloc_with_final(), &_gvn);
       
   971       alloc->compute_MemBar_redundancy(method());
       
   972     }
   965     if (PrintOpto && (Verbose || WizardMode)) {
   973     if (PrintOpto && (Verbose || WizardMode)) {
   966       method()->print_name();
   974       method()->print_name();
   967       tty->print_cr(" writes finals and needs a memory barrier");
   975       tty->print_cr(" writes finals and needs a memory barrier");
   968     }
   976     }
   969   }
   977   }