src/share/vm/opto/matcher.cpp

changeset 6489
50fdb38839eb
parent 6485
da862781b584
child 6490
41b780b43b74
equal deleted inserted replaced
6488:4cdf4f71177d 6489:50fdb38839eb
2331 // intervening volatile load, and thus we don't need a barrier here. 2331 // intervening volatile load, and thus we don't need a barrier here.
2332 // We retain the Node to act as a compiler ordering barrier. 2332 // We retain the Node to act as a compiler ordering barrier.
2333 bool Matcher::post_store_load_barrier(const Node* vmb) { 2333 bool Matcher::post_store_load_barrier(const Node* vmb) {
2334 Compile* C = Compile::current(); 2334 Compile* C = Compile::current();
2335 assert(vmb->is_MemBar(), ""); 2335 assert(vmb->is_MemBar(), "");
2336 assert(vmb->Opcode() != Op_MemBarAcquire, ""); 2336 assert(vmb->Opcode() != Op_MemBarAcquire && vmb->Opcode() != Op_LoadFence, "");
2337 const MemBarNode* membar = vmb->as_MemBar(); 2337 const MemBarNode* membar = vmb->as_MemBar();
2338 2338
2339 // Get the Ideal Proj node, ctrl, that can be used to iterate forward 2339 // Get the Ideal Proj node, ctrl, that can be used to iterate forward
2340 Node* ctrl = NULL; 2340 Node* ctrl = NULL;
2341 for (DUIterator_Fast imax, i = membar->fast_outs(imax); i < imax; i++) { 2341 for (DUIterator_Fast imax, i = membar->fast_outs(imax); i < imax; i++) {
2376 } 2376 }
2377 2377
2378 if (x->is_MemBar()) { 2378 if (x->is_MemBar()) {
2379 // We must retain this membar if there is an upcoming volatile 2379 // We must retain this membar if there is an upcoming volatile
2380 // load, which will be followed by acquire membar. 2380 // load, which will be followed by acquire membar.
2381 if (xop == Op_MemBarAcquire) { 2381 if (xop == Op_MemBarAcquire || xop == Op_LoadFence) {
2382 return false; 2382 return false;
2383 } else { 2383 } else {
2384 // For other kinds of barriers, check by pretending we 2384 // For other kinds of barriers, check by pretending we
2385 // are them, and seeing if we can be removed. 2385 // are them, and seeing if we can be removed.
2386 return post_store_load_barrier(x->as_MemBar()); 2386 return post_store_load_barrier(x->as_MemBar());

mercurial