980 // Factory method. Builds a wide or narrow membar. 981 // Optional 'precedent' becomes an extra edge if not null. 982 static MemBarNode* make(Compile* C, int opcode, 983 int alias_idx = Compile::AliasIdxBot, 984 Node* precedent = NULL); 985 }; 986 987 // "Acquire" - no following ref can move before (but earlier refs can 988 // follow, like an early Load stalled in cache). Requires multi-cpu 989 // visibility. Inserted after a volatile load. 990 class MemBarAcquireNode: public MemBarNode { 991 public: 992 MemBarAcquireNode(Compile* C, int alias_idx, Node* precedent) 993 : MemBarNode(C, alias_idx, precedent) {} 994 virtual int Opcode() const; 995 }; 996 997 // "Acquire" - no following ref can move before (but earlier refs can 998 // follow, like an early Load stalled in cache). Requires multi-cpu 999 // visibility. Inserted independ of any load, as required 1000 // for intrinsic sun.misc.Unsafe.loadFence(). 1001 class LoadFenceNode: public MemBarNode { 1002 public: 1003 LoadFenceNode(Compile* C, int alias_idx, Node* precedent) 1004 : MemBarNode(C, alias_idx, precedent) {} 1005 virtual int Opcode() const; 1006 }; 1007 1008 // "Release" - no earlier ref can move after (but later refs can move 1009 // up, like a speculative pipelined cache-hitting Load). Requires 1010 // multi-cpu visibility. Inserted before a volatile store. 1011 class MemBarReleaseNode: public MemBarNode { 1012 public: 1013 MemBarReleaseNode(Compile* C, int alias_idx, Node* precedent) 1014 : MemBarNode(C, alias_idx, precedent) {} 1015 virtual int Opcode() const; 1016 }; 1017 1018 // "Release" - no earlier ref can move after (but later refs can move 1019 // up, like a speculative pipelined cache-hitting Load). Requires 1020 // multi-cpu visibility. Inserted independent of any store, as required 1021 // for intrinsic sun.misc.Unsafe.storeFence(). 1022 class StoreFenceNode: public MemBarNode { 1023 public: 1024 StoreFenceNode(Compile* C, int alias_idx, Node* precedent) 1025 : MemBarNode(C, alias_idx, precedent) {} 1026 virtual int Opcode() const; 1027 }; 1028 1029 // "Acquire" - no following ref can move before (but earlier refs can 1030 // follow, like an early Load stalled in cache). Requires multi-cpu 1031 // visibility. Inserted after a FastLock. 1032 class MemBarAcquireLockNode: public MemBarNode { 1033 public: 1034 MemBarAcquireLockNode(Compile* C, int alias_idx, Node* precedent) 1035 : MemBarNode(C, alias_idx, precedent) {} 1036 virtual int Opcode() const; 1037 }; 1038 1039 // "Release" - no earlier ref can move after (but later refs can move 1040 // up, like a speculative pipelined cache-hitting Load). Requires 1041 // multi-cpu visibility. Inserted before a FastUnLock. | 980 // Factory method. Builds a wide or narrow membar. 981 // Optional 'precedent' becomes an extra edge if not null. 982 static MemBarNode* make(Compile* C, int opcode, 983 int alias_idx = Compile::AliasIdxBot, 984 Node* precedent = NULL); 985 }; 986 987 // "Acquire" - no following ref can move before (but earlier refs can 988 // follow, like an early Load stalled in cache). Requires multi-cpu 989 // visibility. Inserted after a volatile load. 990 class MemBarAcquireNode: public MemBarNode { 991 public: 992 MemBarAcquireNode(Compile* C, int alias_idx, Node* precedent) 993 : MemBarNode(C, alias_idx, precedent) {} 994 virtual int Opcode() const; 995 }; 996 997 // "Acquire" - no following ref can move before (but earlier refs can 998 // follow, like an early Load stalled in cache). Requires multi-cpu 999 // visibility. Inserted independ of any load, as required 1000 // for intrinsic [sun|jdk.internal].misc.Unsafe.loadFence(). 1001 class LoadFenceNode: public MemBarNode { 1002 public: 1003 LoadFenceNode(Compile* C, int alias_idx, Node* precedent) 1004 : MemBarNode(C, alias_idx, precedent) {} 1005 virtual int Opcode() const; 1006 }; 1007 1008 // "Release" - no earlier ref can move after (but later refs can move 1009 // up, like a speculative pipelined cache-hitting Load). Requires 1010 // multi-cpu visibility. Inserted before a volatile store. 1011 class MemBarReleaseNode: public MemBarNode { 1012 public: 1013 MemBarReleaseNode(Compile* C, int alias_idx, Node* precedent) 1014 : MemBarNode(C, alias_idx, precedent) {} 1015 virtual int Opcode() const; 1016 }; 1017 1018 // "Release" - no earlier ref can move after (but later refs can move 1019 // up, like a speculative pipelined cache-hitting Load). Requires 1020 // multi-cpu visibility. Inserted independent of any store, as required 1021 // for intrinsic [sun|jdk.internal].misc.Unsafe.storeFence(). 1022 class StoreFenceNode: public MemBarNode { 1023 public: 1024 StoreFenceNode(Compile* C, int alias_idx, Node* precedent) 1025 : MemBarNode(C, alias_idx, precedent) {} 1026 virtual int Opcode() const; 1027 }; 1028 1029 // "Acquire" - no following ref can move before (but earlier refs can 1030 // follow, like an early Load stalled in cache). Requires multi-cpu 1031 // visibility. Inserted after a FastLock. 1032 class MemBarAcquireLockNode: public MemBarNode { 1033 public: 1034 MemBarAcquireLockNode(Compile* C, int alias_idx, Node* precedent) 1035 : MemBarNode(C, alias_idx, precedent) {} 1036 virtual int Opcode() const; 1037 }; 1038 1039 // "Release" - no earlier ref can move after (but later refs can move 1040 // up, like a speculative pipelined cache-hitting Load). Requires 1041 // multi-cpu visibility. Inserted before a FastUnLock. |