equal
deleted
inserted
replaced
39 |
39 |
40 bool C2Access::needs_cpu_membar() const { |
40 bool C2Access::needs_cpu_membar() const { |
41 bool mismatched = (_decorators & C2_MISMATCHED) != 0; |
41 bool mismatched = (_decorators & C2_MISMATCHED) != 0; |
42 bool is_unordered = (_decorators & MO_UNORDERED) != 0; |
42 bool is_unordered = (_decorators & MO_UNORDERED) != 0; |
43 bool anonymous = (_decorators & C2_UNSAFE_ACCESS) != 0; |
43 bool anonymous = (_decorators & C2_UNSAFE_ACCESS) != 0; |
44 bool on_heap = (_decorators & IN_HEAP) != 0; |
44 bool in_heap = (_decorators & IN_HEAP) != 0; |
45 |
45 |
46 bool is_write = (_decorators & C2_WRITE_ACCESS) != 0; |
46 bool is_write = (_decorators & C2_WRITE_ACCESS) != 0; |
47 bool is_read = (_decorators & C2_READ_ACCESS) != 0; |
47 bool is_read = (_decorators & C2_READ_ACCESS) != 0; |
48 bool is_atomic = is_read && is_write; |
48 bool is_atomic = is_read && is_write; |
49 |
49 |
56 // We will need memory barriers unless we can determine a unique |
56 // We will need memory barriers unless we can determine a unique |
57 // alias category for this reference. (Note: If for some reason |
57 // alias category for this reference. (Note: If for some reason |
58 // the barriers get omitted and the unsafe reference begins to "pollute" |
58 // the barriers get omitted and the unsafe reference begins to "pollute" |
59 // the alias analysis of the rest of the graph, either Compile::can_alias |
59 // the alias analysis of the rest of the graph, either Compile::can_alias |
60 // or Compile::must_alias will throw a diagnostic assert.) |
60 // or Compile::must_alias will throw a diagnostic assert.) |
61 if (!on_heap || !is_unordered || (mismatched && !_addr.type()->isa_aryptr())) { |
61 if (!in_heap || !is_unordered || (mismatched && !_addr.type()->isa_aryptr())) { |
62 return true; |
62 return true; |
63 } |
63 } |
64 } |
64 } |
65 |
65 |
66 return false; |
66 return false; |
72 |
72 |
73 bool mismatched = (decorators & C2_MISMATCHED) != 0; |
73 bool mismatched = (decorators & C2_MISMATCHED) != 0; |
74 bool unaligned = (decorators & C2_UNALIGNED) != 0; |
74 bool unaligned = (decorators & C2_UNALIGNED) != 0; |
75 bool requires_atomic_access = (decorators & MO_UNORDERED) == 0; |
75 bool requires_atomic_access = (decorators & MO_UNORDERED) == 0; |
76 |
76 |
77 bool in_root = (decorators & IN_ROOT) != 0; |
77 bool in_native = (decorators & IN_NATIVE) != 0; |
78 assert(!in_root, "not supported yet"); |
78 assert(!in_native, "not supported yet"); |
79 |
79 |
80 if (access.type() == T_DOUBLE) { |
80 if (access.type() == T_DOUBLE) { |
81 Node* new_val = kit->dstore_rounding(val.node()); |
81 Node* new_val = kit->dstore_rounding(val.node()); |
82 val.set_node(new_val); |
82 val.set_node(new_val); |
83 } |
83 } |
101 bool requires_atomic_access = (decorators & MO_UNORDERED) == 0; |
101 bool requires_atomic_access = (decorators & MO_UNORDERED) == 0; |
102 bool unaligned = (decorators & C2_UNALIGNED) != 0; |
102 bool unaligned = (decorators & C2_UNALIGNED) != 0; |
103 bool control_dependent = (decorators & C2_CONTROL_DEPENDENT_LOAD) != 0; |
103 bool control_dependent = (decorators & C2_CONTROL_DEPENDENT_LOAD) != 0; |
104 bool pinned = (decorators & C2_PINNED_LOAD) != 0; |
104 bool pinned = (decorators & C2_PINNED_LOAD) != 0; |
105 |
105 |
106 bool in_root = (decorators & IN_ROOT) != 0; |
106 bool in_native = (decorators & IN_NATIVE) != 0; |
107 assert(!in_root, "not supported yet"); |
107 assert(!in_native, "not supported yet"); |
108 |
108 |
109 MemNode::MemOrd mo = access.mem_node_mo(); |
109 MemNode::MemOrd mo = access.mem_node_mo(); |
110 LoadNode::ControlDependency dep = pinned ? LoadNode::Pinned : LoadNode::DependsOnlyOnTest; |
110 LoadNode::ControlDependency dep = pinned ? LoadNode::Pinned : LoadNode::DependsOnlyOnTest; |
111 Node* control = control_dependent ? kit->control() : NULL; |
111 Node* control = control_dependent ? kit->control() : NULL; |
112 |
112 |