--- a/src/hotspot/share/opto/memnode.cpp Thu Feb 14 15:27:12 2019 -0800
+++ b/src/hotspot/share/opto/memnode.cpp Thu Feb 14 15:27:12 2019 -0800
@@ -99,6 +99,9 @@
if (_mismatched_access) {
st->print(" mismatched");
}
+ if (_unsafe_access) {
+ st->print(" unsafe");
+ }
}
void MemNode::dump_adr_type(const Node* mem, const TypePtr* adr_type, outputStream *st) {
@@ -789,7 +792,7 @@
//----------------------------LoadNode::make-----------------------------------
// Polymorphic factory method:
Node *LoadNode::make(PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const TypePtr* adr_type, const Type *rt, BasicType bt, MemOrd mo,
- ControlDependency control_dependency, bool unaligned, bool mismatched) {
+ ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe) {
Compile* C = gvn.C;
// sanity check the alias category against the created node type
@@ -837,6 +840,9 @@
if (mismatched) {
load->set_mismatched_access();
}
+ if (unsafe) {
+ load->set_unsafe_access();
+ }
if (load->Opcode() == Op_LoadN) {
Node* ld = gvn.transform(load);
return new DecodeNNode(ld, ld->bottom_type()->make_ptr());
@@ -846,7 +852,7 @@
}
LoadLNode* LoadLNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo,
- ControlDependency control_dependency, bool unaligned, bool mismatched) {
+ ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe) {
bool require_atomic = true;
LoadLNode* load = new LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), mo, control_dependency, require_atomic);
if (unaligned) {
@@ -855,11 +861,14 @@
if (mismatched) {
load->set_mismatched_access();
}
+ if (unsafe) {
+ load->set_unsafe_access();
+ }
return load;
}
LoadDNode* LoadDNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo,
- ControlDependency control_dependency, bool unaligned, bool mismatched) {
+ ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe) {
bool require_atomic = true;
LoadDNode* load = new LoadDNode(ctl, mem, adr, adr_type, rt, mo, control_dependency, require_atomic);
if (unaligned) {
@@ -868,6 +877,9 @@
if (mismatched) {
load->set_mismatched_access();
}
+ if (unsafe) {
+ load->set_unsafe_access();
+ }
return load;
}