equal
deleted
inserted
replaced
45 #include "opto/rootnode.hpp" |
45 #include "opto/rootnode.hpp" |
46 #include "opto/runtime.hpp" |
46 #include "opto/runtime.hpp" |
47 #include "opto/subnode.hpp" |
47 #include "opto/subnode.hpp" |
48 #include "opto/type.hpp" |
48 #include "opto/type.hpp" |
49 #include "runtime/sharedRuntime.hpp" |
49 #include "runtime/sharedRuntime.hpp" |
50 #if INCLUDE_ALL_GCS |
50 #if INCLUDE_G1GC |
51 #include "gc/g1/g1ThreadLocalData.hpp" |
51 #include "gc/g1/g1ThreadLocalData.hpp" |
52 #endif // INCLUDE_ALL_GCS |
52 #endif // INCLUDE_G1GC |
53 |
53 |
54 |
54 |
55 // |
55 // |
56 // Replace any references to "oldref" in inputs to "use" with "newref". |
56 // Replace any references to "oldref" in inputs to "use" with "newref". |
57 // Returns the number of replacements made. |
57 // Returns the number of replacements made. |
244 continue; |
244 continue; |
245 } |
245 } |
246 assert(mem->is_Store(), "store required"); |
246 assert(mem->is_Store(), "store required"); |
247 _igvn.replace_node(mem, mem->in(MemNode::Memory)); |
247 _igvn.replace_node(mem, mem->in(MemNode::Memory)); |
248 } |
248 } |
249 } else { |
249 } |
|
250 #if INCLUDE_G1GC |
|
251 else { |
250 // G1 pre/post barriers |
252 // G1 pre/post barriers |
251 assert(p2x->outcnt() <= 2, "expects 1 or 2 users: Xor and URShift nodes"); |
253 assert(p2x->outcnt() <= 2, "expects 1 or 2 users: Xor and URShift nodes"); |
252 // It could be only one user, URShift node, in Object.clone() intrinsic |
254 // It could be only one user, URShift node, in Object.clone() intrinsic |
253 // but the new allocation is passed to arraycopy stub and it could not |
255 // but the new allocation is passed to arraycopy stub and it could not |
254 // be scalar replaced. So we don't check the case. |
256 // be scalar replaced. So we don't check the case. |
324 // Now CastP2X can be removed since it is used only on dead path |
326 // Now CastP2X can be removed since it is used only on dead path |
325 // which currently still alive until igvn optimize it. |
327 // which currently still alive until igvn optimize it. |
326 assert(p2x->outcnt() == 0 || p2x->unique_out()->Opcode() == Op_URShiftX, ""); |
328 assert(p2x->outcnt() == 0 || p2x->unique_out()->Opcode() == Op_URShiftX, ""); |
327 _igvn.replace_node(p2x, top()); |
329 _igvn.replace_node(p2x, top()); |
328 } |
330 } |
|
331 #endif // INCLUDE_G1GC |
329 } |
332 } |
330 |
333 |
331 // Search for a memory operation for the specified memory slice. |
334 // Search for a memory operation for the specified memory slice. |
332 static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_mem, Node *alloc, PhaseGVN *phase) { |
335 static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_mem, Node *alloc, PhaseGVN *phase) { |
333 Node *orig_mem = mem; |
336 Node *orig_mem = mem; |