Mercurial > hg > truffle
diff src/share/vm/opto/memnode.hpp @ 3849:f1c12354c3f7
7074017: Introduce MemBarAcquireLock/MemBarReleaseLock nodes for monitor enter/exit code paths
Summary: replace MemBarAcquire/MemBarRelease nodes on the monitor enter/exit code paths with new MemBarAcquireLock/MemBarReleaseLock nodes
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Tue, 02 Aug 2011 18:36:40 +0200 |
parents | 1d1603768966 |
children | 1af104d6cf99 |
line wrap: on
line diff
--- a/src/share/vm/opto/memnode.hpp Mon Aug 08 13:19:46 2011 -0700 +++ b/src/share/vm/opto/memnode.hpp Tue Aug 02 18:36:40 2011 +0200 @@ -879,7 +879,7 @@ // "Acquire" - no following ref can move before (but earlier refs can // follow, like an early Load stalled in cache). Requires multi-cpu -// visibility. Inserted after a volatile load or FastLock. +// visibility. Inserted after a volatile load. class MemBarAcquireNode: public MemBarNode { public: MemBarAcquireNode(Compile* C, int alias_idx, Node* precedent) @@ -889,7 +889,7 @@ // "Release" - no earlier ref can move after (but later refs can move // up, like a speculative pipelined cache-hitting Load). Requires -// multi-cpu visibility. Inserted before a volatile store or FastUnLock. +// multi-cpu visibility. Inserted before a volatile store. class MemBarReleaseNode: public MemBarNode { public: MemBarReleaseNode(Compile* C, int alias_idx, Node* precedent) @@ -897,6 +897,26 @@ virtual int Opcode() const; }; +// "Acquire" - no following ref can move before (but earlier refs can +// follow, like an early Load stalled in cache). Requires multi-cpu +// visibility. Inserted after a FastLock. +class MemBarAcquireLockNode: public MemBarNode { +public: + MemBarAcquireLockNode(Compile* C, int alias_idx, Node* precedent) + : MemBarNode(C, alias_idx, precedent) {} + virtual int Opcode() const; +}; + +// "Release" - no earlier ref can move after (but later refs can move +// up, like a speculative pipelined cache-hitting Load). Requires +// multi-cpu visibility. Inserted before a FastUnLock. +class MemBarReleaseLockNode: public MemBarNode { +public: + MemBarReleaseLockNode(Compile* C, int alias_idx, Node* precedent) + : MemBarNode(C, alias_idx, precedent) {} + virtual int Opcode() const; +}; + // Ordering between a volatile store and a following volatile load. // Requires multi-CPU visibility? class MemBarVolatileNode: public MemBarNode {