1000 // through any kind of MemBar but normal loads shouldn't skip |
1000 // through any kind of MemBar but normal loads shouldn't skip |
1001 // through MemBarAcquire since the could allow them to move out of |
1001 // through MemBarAcquire since the could allow them to move out of |
1002 // a synchronized region. |
1002 // a synchronized region. |
1003 while (current->is_Proj()) { |
1003 while (current->is_Proj()) { |
1004 int opc = current->in(0)->Opcode(); |
1004 int opc = current->in(0)->Opcode(); |
1005 if ((final && (opc == Op_MemBarAcquire || opc == Op_MemBarAcquireLock)) || |
1005 if ((final && (opc == Op_MemBarAcquire || |
1006 opc == Op_MemBarRelease || opc == Op_MemBarCPUOrder || |
1006 opc == Op_MemBarAcquireLock || |
1007 opc == Op_MemBarReleaseLock) { |
1007 opc == Op_LoadFence)) || |
|
1008 opc == Op_MemBarRelease || |
|
1009 opc == Op_StoreFence || |
|
1010 opc == Op_MemBarReleaseLock || |
|
1011 opc == Op_MemBarCPUOrder) { |
1008 Node* mem = current->in(0)->in(TypeFunc::Memory); |
1012 Node* mem = current->in(0)->in(TypeFunc::Memory); |
1009 if (mem->is_MergeMem()) { |
1013 if (mem->is_MergeMem()) { |
1010 MergeMemNode* merge = mem->as_MergeMem(); |
1014 MergeMemNode* merge = mem->as_MergeMem(); |
1011 Node* new_st = merge->memory_at(alias_idx); |
1015 Node* new_st = merge->memory_at(alias_idx); |
1012 if (new_st == merge->base_memory()) { |
1016 if (new_st == merge->base_memory()) { |
2971 } |
2975 } |
2972 |
2976 |
2973 //------------------------------make------------------------------------------- |
2977 //------------------------------make------------------------------------------- |
2974 MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { |
2978 MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { |
2975 switch (opcode) { |
2979 switch (opcode) { |
2976 case Op_MemBarAcquire: return new(C) MemBarAcquireNode(C, atp, pn); |
2980 case Op_MemBarAcquire: return new(C) MemBarAcquireNode(C, atp, pn); |
2977 case Op_MemBarRelease: return new(C) MemBarReleaseNode(C, atp, pn); |
2981 case Op_LoadFence: return new(C) LoadFenceNode(C, atp, pn); |
2978 case Op_MemBarAcquireLock: return new(C) MemBarAcquireLockNode(C, atp, pn); |
2982 case Op_MemBarRelease: return new(C) MemBarReleaseNode(C, atp, pn); |
2979 case Op_MemBarReleaseLock: return new(C) MemBarReleaseLockNode(C, atp, pn); |
2983 case Op_StoreFence: return new(C) StoreFenceNode(C, atp, pn); |
2980 case Op_MemBarVolatile: return new(C) MemBarVolatileNode(C, atp, pn); |
2984 case Op_MemBarAcquireLock: return new(C) MemBarAcquireLockNode(C, atp, pn); |
2981 case Op_MemBarCPUOrder: return new(C) MemBarCPUOrderNode(C, atp, pn); |
2985 case Op_MemBarReleaseLock: return new(C) MemBarReleaseLockNode(C, atp, pn); |
2982 case Op_Initialize: return new(C) InitializeNode(C, atp, pn); |
2986 case Op_MemBarVolatile: return new(C) MemBarVolatileNode(C, atp, pn); |
2983 case Op_MemBarStoreStore: return new(C) MemBarStoreStoreNode(C, atp, pn); |
2987 case Op_MemBarCPUOrder: return new(C) MemBarCPUOrderNode(C, atp, pn); |
2984 default: ShouldNotReachHere(); return NULL; |
2988 case Op_Initialize: return new(C) InitializeNode(C, atp, pn); |
|
2989 case Op_MemBarStoreStore: return new(C) MemBarStoreStoreNode(C, atp, pn); |
|
2990 default: ShouldNotReachHere(); return NULL; |
2985 } |
2991 } |
2986 } |
2992 } |
2987 |
2993 |
2988 //------------------------------Ideal------------------------------------------ |
2994 //------------------------------Ideal------------------------------------------ |
2989 // Return a node which is more "ideal" than the current node. Strip out |
2995 // Return a node which is more "ideal" than the current node. Strip out |