--- a/hotspot/src/share/vm/opto/callnode.cpp Wed Jun 03 08:23:09 2015 +0000
+++ b/hotspot/src/share/vm/opto/callnode.cpp Fri Jun 12 14:10:17 2015 +0200
@@ -724,6 +724,26 @@
//
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.
@@ -909,6 +929,12 @@
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); }
@@ -1007,14 +1033,6 @@
//=============================================================================
-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("# ");
@@ -1930,26 +1948,3 @@
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);
-}