mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
7074017: Introduce MemBarAcquireLock/MemBarReleaseLock nodes for monitor enter/exit code paths
Replace MemBarAcquire/MemBarRelease nodes on the monitor enter/exit code paths with new MemBarAcquireLock/MemBarReleaseLock nodes Reviewed-by: kvn, twisti
This commit is contained in:
parent
9cd1a00e3f
commit
b543a07b9a
11 changed files with 45 additions and 83 deletions
|
@ -1816,9 +1816,9 @@ bool PhaseMacroExpand::eliminate_locking_node(AbstractLockNode *alock) {
|
|||
// The input to a Lock is merged memory, so extract its RawMem input
|
||||
// (unless the MergeMem has been optimized away.)
|
||||
if (alock->is_Lock()) {
|
||||
// Seach for MemBarAcquire node and delete it also.
|
||||
// Seach for MemBarAcquireLock node and delete it also.
|
||||
MemBarNode* membar = fallthroughproj->unique_ctrl_out()->as_MemBar();
|
||||
assert(membar != NULL && membar->Opcode() == Op_MemBarAcquire, "");
|
||||
assert(membar != NULL && membar->Opcode() == Op_MemBarAcquireLock, "");
|
||||
Node* ctrlproj = membar->proj_out(TypeFunc::Control);
|
||||
Node* memproj = membar->proj_out(TypeFunc::Memory);
|
||||
_igvn.replace_node(ctrlproj, fallthroughproj);
|
||||
|
@ -1833,11 +1833,11 @@ bool PhaseMacroExpand::eliminate_locking_node(AbstractLockNode *alock) {
|
|||
}
|
||||
}
|
||||
|
||||
// Seach for MemBarRelease node and delete it also.
|
||||
// Seach for MemBarReleaseLock node and delete it also.
|
||||
if (alock->is_Unlock() && ctrl != NULL && ctrl->is_Proj() &&
|
||||
ctrl->in(0)->is_MemBar()) {
|
||||
MemBarNode* membar = ctrl->in(0)->as_MemBar();
|
||||
assert(membar->Opcode() == Op_MemBarRelease &&
|
||||
assert(membar->Opcode() == Op_MemBarReleaseLock &&
|
||||
mem->is_Proj() && membar == mem->in(0), "");
|
||||
_igvn.replace_node(fallthroughproj, ctrl);
|
||||
_igvn.replace_node(memproj_fallthrough, mem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue