equal
deleted
inserted
replaced
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 } |