mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8210885: Convert left over loads/stores to access api
Reviewed-by: thartmann, rkennke
This commit is contained in:
parent
be56cc5bf3
commit
03e4400864
9 changed files with 63 additions and 78 deletions
|
@ -1758,11 +1758,9 @@ bool LibraryCallKit::inline_string_char_access(bool is_store) {
|
|||
return false;
|
||||
}
|
||||
if (is_store) {
|
||||
(void) store_to_memory(control(), adr, ch, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered,
|
||||
false, false, true /* mismatched */);
|
||||
access_store_at(value, adr, TypeAryPtr::BYTES, ch, TypeInt::CHAR, T_CHAR, IN_HEAP | MO_UNORDERED | C2_MISMATCHED);
|
||||
} else {
|
||||
ch = make_load(control(), adr, TypeInt::CHAR, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered,
|
||||
LoadNode::DependsOnlyOnTest, false, false, true /* mismatched */);
|
||||
ch = access_load_at(value, adr, TypeAryPtr::BYTES, TypeInt::CHAR, T_CHAR, IN_HEAP | MO_UNORDERED | C2_MISMATCHED | C2_CONTROL_DEPENDENT_LOAD);
|
||||
set_result(ch);
|
||||
}
|
||||
return true;
|
||||
|
@ -2512,7 +2510,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
|
|||
val = ConvL2X(val);
|
||||
val = gvn().transform(new CastX2PNode(val));
|
||||
}
|
||||
access_store_at(control(), heap_base_oop, adr, adr_type, val, value_type, type, decorators);
|
||||
access_store_at(heap_base_oop, adr, adr_type, val, value_type, type, decorators);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -2731,24 +2729,24 @@ bool LibraryCallKit::inline_unsafe_load_store(const BasicType type, const LoadSt
|
|||
Node* result = NULL;
|
||||
switch (kind) {
|
||||
case LS_cmp_exchange: {
|
||||
result = access_atomic_cmpxchg_val_at(control(), base, adr, adr_type, alias_idx,
|
||||
result = access_atomic_cmpxchg_val_at(base, adr, adr_type, alias_idx,
|
||||
oldval, newval, value_type, type, decorators);
|
||||
break;
|
||||
}
|
||||
case LS_cmp_swap_weak:
|
||||
decorators |= C2_WEAK_CMPXCHG;
|
||||
case LS_cmp_swap: {
|
||||
result = access_atomic_cmpxchg_bool_at(control(), base, adr, adr_type, alias_idx,
|
||||
result = access_atomic_cmpxchg_bool_at(base, adr, adr_type, alias_idx,
|
||||
oldval, newval, value_type, type, decorators);
|
||||
break;
|
||||
}
|
||||
case LS_get_set: {
|
||||
result = access_atomic_xchg_at(control(), base, adr, adr_type, alias_idx,
|
||||
result = access_atomic_xchg_at(base, adr, adr_type, alias_idx,
|
||||
newval, value_type, type, decorators);
|
||||
break;
|
||||
}
|
||||
case LS_get_add: {
|
||||
result = access_atomic_add_at(control(), base, adr, adr_type, alias_idx,
|
||||
result = access_atomic_add_at(base, adr, adr_type, alias_idx,
|
||||
newval, value_type, type, decorators);
|
||||
break;
|
||||
}
|
||||
|
@ -4232,7 +4230,7 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
|
|||
// TODO: generate fields copies for small objects instead.
|
||||
Node* size = _gvn.transform(obj_size);
|
||||
|
||||
access_clone(control(), obj, alloc_obj, size, is_array);
|
||||
access_clone(obj, alloc_obj, size, is_array);
|
||||
|
||||
// Do not let reads from the cloned object float above the arraycopy.
|
||||
if (alloc != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue