equal
deleted
inserted
replaced
2152 } |
2152 } |
2153 #endif |
2153 #endif |
2154 |
2154 |
2155 Node* mem = alock->in(TypeFunc::Memory); |
2155 Node* mem = alock->in(TypeFunc::Memory); |
2156 Node* ctrl = alock->in(TypeFunc::Control); |
2156 Node* ctrl = alock->in(TypeFunc::Control); |
|
2157 guarantee(ctrl != NULL, "missing control projection, cannot replace_node() with NULL"); |
2157 |
2158 |
2158 extract_call_projections(alock); |
2159 extract_call_projections(alock); |
2159 // There are 2 projections from the lock. The lock node will |
2160 // There are 2 projections from the lock. The lock node will |
2160 // be deleted when its last use is subsumed below. |
2161 // be deleted when its last use is subsumed below. |
2161 assert(alock->outcnt() == 2 && |
2162 assert(alock->outcnt() == 2 && |
2186 _igvn.replace_node(flock, top()); |
2187 _igvn.replace_node(flock, top()); |
2187 } |
2188 } |
2188 } |
2189 } |
2189 |
2190 |
2190 // Seach for MemBarReleaseLock node and delete it also. |
2191 // Seach for MemBarReleaseLock node and delete it also. |
2191 if (alock->is_Unlock() && ctrl != NULL && ctrl->is_Proj() && |
2192 if (alock->is_Unlock() && ctrl->is_Proj() && ctrl->in(0)->is_MemBar()) { |
2192 ctrl->in(0)->is_MemBar()) { |
|
2193 MemBarNode* membar = ctrl->in(0)->as_MemBar(); |
2193 MemBarNode* membar = ctrl->in(0)->as_MemBar(); |
2194 assert(membar->Opcode() == Op_MemBarReleaseLock && |
2194 assert(membar->Opcode() == Op_MemBarReleaseLock && |
2195 mem->is_Proj() && membar == mem->in(0), ""); |
2195 mem->is_Proj() && membar == mem->in(0), ""); |
2196 _igvn.replace_node(fallthroughproj, ctrl); |
2196 _igvn.replace_node(fallthroughproj, ctrl); |
2197 _igvn.replace_node(memproj_fallthrough, mem); |
2197 _igvn.replace_node(memproj_fallthrough, mem); |