8299032: Interface IN_NATIVE oop stores for C2

Reviewed-by: stefank, rcastanedalo
This commit is contained in:
Erik Österlund 2023-01-13 12:48:30 +00:00
parent c250222880
commit e7fa150bc1
2 changed files with 1 additions and 8 deletions

View File

@ -85,9 +85,6 @@ Node* BarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) cons
bool unsafe = (decorators & C2_UNSAFE_ACCESS) != 0;
bool requires_atomic_access = (decorators & MO_UNORDERED) == 0;
bool in_native = (decorators & IN_NATIVE) != 0;
assert(!in_native || (unsafe && !access.is_oop()), "not supported yet");
MemNode::MemOrd mo = access.mem_node_mo();
Node* store;
@ -144,8 +141,6 @@ Node* BarrierSetC2::load_at_resolved(C2Access& access, const Type* val_type) con
bool unsafe = (decorators & C2_UNSAFE_ACCESS) != 0;
bool immutable = (decorators & C2_IMMUTABLE_MEMORY) != 0;
bool in_native = (decorators & IN_NATIVE) != 0;
MemNode::MemOrd mo = access.mem_node_mo();
LoadNode::ControlDependency dep = unknown_control ? LoadNode::UnknownControl : LoadNode::DependsOnlyOnTest;

View File

@ -3350,9 +3350,7 @@ bool LibraryCallKit::inline_native_setCurrentThread() {
= make_load(NULL, p, p->bottom_type()->is_ptr(), T_OBJECT, MemNode::unordered);
thread_obj_handle = _gvn.transform(thread_obj_handle);
const TypePtr *adr_type = _gvn.type(thread_obj_handle)->isa_ptr();
// Stores of oops to native memory not supported yet by BarrierSetC2::store_at_resolved
// access_store_at(NULL, thread_obj_handle, adr_type, arr, _gvn.type(arr), T_OBJECT, IN_NATIVE | MO_UNORDERED);
store_to_memory(control(), thread_obj_handle, arr, T_OBJECT, adr_type, MemNode::unordered);
access_store_at(NULL, thread_obj_handle, adr_type, arr, _gvn.type(arr), T_OBJECT, IN_NATIVE | MO_UNORDERED);
JFR_ONLY(extend_setCurrentThread(thread, arr);)
return true;
}