< prev index next >
src/hotspot/share/opto/graphKit.cpp
Print this page
@@ -1720,13 +1720,13 @@
} else {
return _barrier_set->atomic_add_at(access, new_val, value_type);
}
}
-void GraphKit::access_clone(Node* ctl, Node* src, Node* dst, Node* size, bool is_array) {
+void GraphKit::access_clone(Node* ctl, Node* src_base, Node* dst_base, Node* countx, bool is_array) {
set_control(ctl);
- return _barrier_set->clone(this, src, dst, size, is_array);
+ return _barrier_set->clone(this, src_base, dst_base, countx, is_array);
}
//-------------------------array_element_address-------------------------
Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt,
const TypeInt* sizetype, Node* ctrl) {
@@ -3345,11 +3345,11 @@
Deoptimization::Action_none);
}
}
// Deoptimize if 'ary' is flattened or if 'obj' is null and 'ary' is a value type array
-void GraphKit::gen_value_type_array_guard(Node* ary, Node* obj, Node* elem_klass) {
+void GraphKit::gen_value_type_array_guard(Node* ary, Node* obj, Node* elem_klass, int nargs) {
assert(EnableValhalla, "should only be used if value types are enabled");
if (elem_klass == NULL) {
// Load array element klass
Node* kls = load_object_klass(ary);
Node* k_adr = basic_plus_adr(kls, in_bytes(ArrayKlass::element_klass_offset()));
@@ -3365,33 +3365,30 @@
// Object is always null, check if array is a value type array
Node* cmp = _gvn.transform(new CmpINode(is_value_elem, intcon(0)));
Node* bol = _gvn.transform(new BoolNode(cmp, BoolTest::eq));
{ BuildCutout unless(this, bol, PROB_MAX);
// TODO just deoptimize for now if we store null to a value type array
+ inc_sp(nargs);
uncommon_trap(Deoptimization::Reason_array_check,
Deoptimization::Action_none);
}
} else {
- // Check if array is flattened or if we are storing null to a value type array
- // TODO can we merge these checks?
- gen_flattened_array_guard(ary);
- if (objtype->meet(TypePtr::NULL_PTR) == objtype) {
// Check if (is_value_elem && obj_is_null) <=> (!is_value_elem | !obj_is_null == 0)
// TODO what if we later figure out that obj is never null?
Node* not_value = _gvn.transform(new XorINode(is_value_elem, intcon(JVM_ACC_VALUE)));
not_value = _gvn.transform(new ConvI2LNode(not_value));
Node* not_null = _gvn.transform(new CastP2XNode(NULL, obj));
Node* both = _gvn.transform(new OrLNode(not_null, not_value));
Node* cmp = _gvn.transform(new CmpLNode(both, longcon(0)));
Node* bol = _gvn.transform(new BoolNode(cmp, BoolTest::ne));
{ BuildCutout unless(this, bol, PROB_MAX);
// TODO just deoptimize for now if we store null to a value type array
+ inc_sp(nargs);
uncommon_trap(Deoptimization::Reason_array_check,
Deoptimization::Action_none);
}
}
- }
}
Node* GraphKit::gen_lh_array_test(Node* kls, unsigned int lh_value) {
Node* lhp = basic_plus_adr(kls, in_bytes(Klass::layout_helper_offset()));
Node* layout_val = make_load(NULL, lhp, TypeInt::INT, T_INT, MemNode::unordered);
< prev index next >