comparison src/share/vm/opto/memnode.hpp @ 4763:1dc233a8c7fe

7121140: Allocation paths require explicit memory synchronization operations for RMO systems Summary: adds store store barrier after initialization of header and body of objects. Reviewed-by: never, kvn
author roland
date Tue, 20 Dec 2011 16:56:50 +0100
parents 1bd45abaa507
children 53a127075045
comparison
equal deleted inserted replaced
4762:069ab3f976d3 4763:1dc233a8c7fe
916 MemBarReleaseLockNode(Compile* C, int alias_idx, Node* precedent) 916 MemBarReleaseLockNode(Compile* C, int alias_idx, Node* precedent)
917 : MemBarNode(C, alias_idx, precedent) {} 917 : MemBarNode(C, alias_idx, precedent) {}
918 virtual int Opcode() const; 918 virtual int Opcode() const;
919 }; 919 };
920 920
921 class MemBarStoreStoreNode: public MemBarNode {
922 public:
923 MemBarStoreStoreNode(Compile* C, int alias_idx, Node* precedent)
924 : MemBarNode(C, alias_idx, precedent) {
925 init_class_id(Class_MemBarStoreStore);
926 }
927 virtual int Opcode() const;
928 };
929
921 // Ordering between a volatile store and a following volatile load. 930 // Ordering between a volatile store and a following volatile load.
922 // Requires multi-CPU visibility? 931 // Requires multi-CPU visibility?
923 class MemBarVolatileNode: public MemBarNode { 932 class MemBarVolatileNode: public MemBarNode {
924 public: 933 public:
925 MemBarVolatileNode(Compile* C, int alias_idx, Node* precedent) 934 MemBarVolatileNode(Compile* C, int alias_idx, Node* precedent)
948 Complete = 1, 957 Complete = 1,
949 WithArraycopy = 2 958 WithArraycopy = 2
950 }; 959 };
951 int _is_complete; 960 int _is_complete;
952 961
962 bool _does_not_escape;
963
953 public: 964 public:
954 enum { 965 enum {
955 Control = TypeFunc::Control, 966 Control = TypeFunc::Control,
956 Memory = TypeFunc::Memory, // MergeMem for states affected by this op 967 Memory = TypeFunc::Memory, // MergeMem for states affected by this op
957 RawAddress = TypeFunc::Parms+0, // the newly-allocated raw address 968 RawAddress = TypeFunc::Parms+0, // the newly-allocated raw address
986 bool is_complete_with_arraycopy() { return (_is_complete & WithArraycopy) != 0; } 997 bool is_complete_with_arraycopy() { return (_is_complete & WithArraycopy) != 0; }
987 998
988 // Mark complete. (Must not yet be complete.) 999 // Mark complete. (Must not yet be complete.)
989 void set_complete(PhaseGVN* phase); 1000 void set_complete(PhaseGVN* phase);
990 void set_complete_with_arraycopy() { _is_complete = Complete | WithArraycopy; } 1001 void set_complete_with_arraycopy() { _is_complete = Complete | WithArraycopy; }
1002
1003 bool does_not_escape() { return _does_not_escape; }
1004 void set_does_not_escape() { _does_not_escape = true; }
991 1005
992 #ifdef ASSERT 1006 #ifdef ASSERT
993 // ensure all non-degenerate stores are ordered and non-overlapping 1007 // ensure all non-degenerate stores are ordered and non-overlapping
994 bool stores_are_sane(PhaseTransform* phase); 1008 bool stores_are_sane(PhaseTransform* phase);
995 #endif //ASSERT 1009 #endif //ASSERT