Mercurial > hg > graal-compiler
comparison src/share/vm/opto/parse3.cpp @ 17794:3514ee402842
8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes
Reviewed-by: dholmes, kvn
Contributed-by: martin.doerr@sap.com
author | goetz |
---|---|
date | Thu, 16 Jan 2014 14:25:51 +0100 |
parents | 2113136690bc |
children | 45467c53f178 |
comparison
equal
deleted
inserted
replaced
17793:c668f307a4c0 | 17794:3514ee402842 |
---|---|
225 type = TypeOopPtr::make_from_klass(field_klass->as_klass()); | 225 type = TypeOopPtr::make_from_klass(field_klass->as_klass()); |
226 } | 226 } |
227 } else { | 227 } else { |
228 type = Type::get_const_basic_type(bt); | 228 type = Type::get_const_basic_type(bt); |
229 } | 229 } |
230 if (support_IRIW_for_not_multiple_copy_atomic_cpu && field->is_volatile()) { | |
231 insert_mem_bar(Op_MemBarVolatile); // StoreLoad barrier | |
232 } | |
230 // Build the load. | 233 // Build the load. |
231 // | 234 // |
232 MemNode::MemOrd mo = is_vol ? MemNode::acquire : MemNode::unordered; | 235 MemNode::MemOrd mo = is_vol ? MemNode::acquire : MemNode::unordered; |
233 Node* ld = make_load(NULL, adr, type, bt, adr_type, mo, is_vol); | 236 Node* ld = make_load(NULL, adr, type, bt, adr_type, mo, is_vol); |
234 | 237 |
315 } | 318 } |
316 | 319 |
317 // If reference is volatile, prevent following volatiles ops from | 320 // If reference is volatile, prevent following volatiles ops from |
318 // floating up before the volatile write. | 321 // floating up before the volatile write. |
319 if (is_vol) { | 322 if (is_vol) { |
320 insert_mem_bar(Op_MemBarVolatile); // Use fat membar | 323 // If not multiple copy atomic, we do the MemBarVolatile before the load. |
324 if (!support_IRIW_for_not_multiple_copy_atomic_cpu) { | |
325 insert_mem_bar(Op_MemBarVolatile); // Use fat membar | |
326 } | |
327 // Remember we wrote a volatile field. | |
328 // For not multiple copy atomic cpu (ppc64) a barrier should be issued | |
329 // in constructors which have such stores. See do_exits() in parse1.cpp. | |
330 if (is_field) { | |
331 set_wrote_volatile(true); | |
332 } | |
321 } | 333 } |
322 | 334 |
323 // If the field is final, the rules of Java say we are in <init> or <clinit>. | 335 // If the field is final, the rules of Java say we are in <init> or <clinit>. |
324 // Note the presence of writes to final non-static fields, so that we | 336 // Note the presence of writes to final non-static fields, so that we |
325 // can insert a memory barrier later on to keep the writes from floating | 337 // can insert a memory barrier later on to keep the writes from floating |