< prev index next >
src/share/vm/opto/escape.cpp
Print this page
rev 10504 : value type calling convention
*** 880,890 ****
// it's fields will be marked as NoEscape at least.
add_java_object(call, PointsToNode::NoEscape);
ptnode_adr(call_idx)->set_scalar_replaceable(false);
} else {
// Determine whether any arguments are returned.
! const TypeTuple* d = call->tf()->domain();
bool ret_arg = false;
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
if (d->field_at(i)->isa_ptr() != NULL &&
call_analyzer->is_arg_returned(i - TypeFunc::Parms)) {
ret_arg = true;
--- 880,890 ----
// it's fields will be marked as NoEscape at least.
add_java_object(call, PointsToNode::NoEscape);
ptnode_adr(call_idx)->set_scalar_replaceable(false);
} else {
// Determine whether any arguments are returned.
! const TypeTuple* d = call->tf()->domain_sig();
bool ret_arg = false;
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
if (d->field_at(i)->isa_ptr() != NULL &&
call_analyzer->is_arg_returned(i - TypeFunc::Parms)) {
ret_arg = true;
*** 927,937 ****
call->as_CallLeaf()->is_call_to_arraycopystub();
// fall through
case Op_CallLeaf: {
// Stub calls, objects do not escape but they are not scale replaceable.
// Adjust escape state for outgoing arguments.
! const TypeTuple * d = call->tf()->domain();
bool src_has_oops = false;
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
const Type* at = d->field_at(i);
Node *arg = call->in(i);
if (arg == NULL) {
--- 927,937 ----
call->as_CallLeaf()->is_call_to_arraycopystub();
// fall through
case Op_CallLeaf: {
// Stub calls, objects do not escape but they are not scale replaceable.
// Adjust escape state for outgoing arguments.
! const TypeTuple * d = call->tf()->domain_sig();
bool src_has_oops = false;
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
const Type* at = d->field_at(i);
Node *arg = call->in(i);
if (arg == NULL) {
*** 1055,1069 ****
}
BCEscapeAnalyzer* call_analyzer = (meth !=NULL) ? meth->get_bcea() : NULL;
// fall-through if not a Java method or no analyzer information
if (call_analyzer != NULL) {
PointsToNode* call_ptn = ptnode_adr(call->_idx);
! const TypeTuple* d = call->tf()->domain();
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
const Type* at = d->field_at(i);
int k = i - TypeFunc::Parms;
! Node* arg = call->in(i);
PointsToNode* arg_ptn = ptnode_adr(arg->_idx);
if (at->isa_ptr() != NULL &&
call_analyzer->is_arg_returned(k)) {
// The call returns arguments.
if (call_ptn != NULL) { // Is call's result used?
--- 1055,1074 ----
}
BCEscapeAnalyzer* call_analyzer = (meth !=NULL) ? meth->get_bcea() : NULL;
// fall-through if not a Java method or no analyzer information
if (call_analyzer != NULL) {
PointsToNode* call_ptn = ptnode_adr(call->_idx);
! const TypeTuple* d = call->tf()->domain_sig();
! int extra = 0;
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
const Type* at = d->field_at(i);
+ if (at->isa_valuetypeptr()) {
+ extra += at->is_valuetypeptr()->value_type()->value_klass()->get_field_count() - 1;
+ continue;
+ }
int k = i - TypeFunc::Parms;
! Node* arg = call->in(i + extra);
PointsToNode* arg_ptn = ptnode_adr(arg->_idx);
if (at->isa_ptr() != NULL &&
call_analyzer->is_arg_returned(k)) {
// The call returns arguments.
if (call_ptn != NULL) { // Is call's result used?
*** 1099,1109 ****
}
default: {
// Fall-through here if not a Java method or no analyzer information
// or some other type of call, assume the worst case: all arguments
// globally escape.
! const TypeTuple* d = call->tf()->domain();
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
const Type* at = d->field_at(i);
if (at->isa_oopptr() != NULL) {
Node* arg = call->in(i);
if (arg->is_AddP()) {
--- 1104,1114 ----
}
default: {
// Fall-through here if not a Java method or no analyzer information
// or some other type of call, assume the worst case: all arguments
// globally escape.
! const TypeTuple* d = call->tf()->domain_sig();
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
const Type* at = d->field_at(i);
if (at->isa_oopptr() != NULL) {
Node* arg = call->in(i);
if (arg->is_AddP()) {
< prev index next >