src/share/vm/opto/callnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/callnode.cpp Fri Jun 12 14:28:03 2015
--- new/src/share/vm/opto/callnode.cpp Fri Jun 12 14:28:01 2015
*** 722,731 ****
--- 722,751 ----
// Determine whether the call could modify the field of the specified
// instance at the specified offset.
//
bool CallNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
assert((t_oop != NULL), "sanity");
+ if (is_call_to_arraycopystub()) {
+ const TypeTuple* args = _tf->domain();
+ Node* dest = NULL;
+ // Stubs that can be called once an ArrayCopyNode is expanded have
+ // different signatures. Look for the second pointer argument,
+ // that is the destination of the copy.
+ for (uint i = TypeFunc::Parms, j = 0; i < args->cnt(); i++) {
+ if (args->field_at(i)->isa_ptr()) {
+ j++;
+ if (j == 2) {
+ dest = in(i);
+ break;
+ }
+ }
+ }
+ if (!dest->is_top() && may_modify_arraycopy_helper(phase->type(dest)->is_oopptr(), t_oop, phase)) {
+ return true;
+ }
+ return false;
+ }
if (t_oop->is_known_instance()) {
// The instance_id is set only for scalar-replaceable allocations which
// are not passed as arguments according to Escape Analysis.
return false;
}
*** 907,916 ****
--- 927,942 ----
}
}
return SafePointNode::Ideal(phase, can_reshape);
}
+ bool CallNode::is_call_to_arraycopystub() const {
+ if (_name != NULL && strstr(_name, "arraycopy") != 0) {
+ return true;
+ }
+ return false;
+ }
//=============================================================================
uint CallJavaNode::size_of() const { return sizeof(*this); }
uint CallJavaNode::cmp( const Node &n ) const {
CallJavaNode &call = (CallJavaNode&)n;
*** 1005,1022 ****
--- 1031,1040 ----
//=============================================================================
//------------------------------calling_convention-----------------------------
//=============================================================================
bool CallLeafNode::is_call_to_arraycopystub() const {
if (_name != NULL && strstr(_name, "arraycopy") != 0) {
return true;
}
return false;
}
#ifndef PRODUCT
void CallLeafNode::dump_spec(outputStream *st) const {
st->print("# ");
st->print("%s", _name);
CallNode::dump_spec(st);
*** 1928,1955 ****
--- 1946,1950 ----
}
return true;
}
bool CallLeafNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
if (is_call_to_arraycopystub()) {
const TypeTuple* args = _tf->domain();
Node* dest = NULL;
// Stubs that can be called once an ArrayCopyNode is expanded have
// different signatures. Look for the second pointer argument,
// that is the destination of the copy.
for (uint i = TypeFunc::Parms, j = 0; i < args->cnt(); i++) {
if (args->field_at(i)->isa_ptr()) {
j++;
if (j == 2) {
dest = in(i);
break;
}
}
}
if (!dest->is_top() && may_modify_arraycopy_helper(phase->type(dest)->is_oopptr(), t_oop, phase)) {
return true;
}
return false;
}
return CallNode::may_modify(t_oop, phase);
}
src/share/vm/opto/callnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File