6673473: (Escape Analysis) Add the instance's field information to PhiNode

Avoid an infinite generation of instance's field values Phi nodes.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2008-03-13 16:31:32 -07:00
parent 000ac830a0
commit 30dc0edfc8
6 changed files with 166 additions and 59 deletions

View file

@ -32,7 +32,18 @@ Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
int wins = 0;
assert( !n->is_CFG(), "" );
assert( region->is_Region(), "" );
Node *phi = new (C, region->req()) PhiNode( region, n->bottom_type() );
const Type* type = n->bottom_type();
const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr();
Node *phi;
if( t_oop != NULL && t_oop->is_instance_field() ) {
int iid = t_oop->instance_id();
int index = C->get_alias_index(t_oop);
int offset = t_oop->offset();
phi = new (C,region->req()) PhiNode(region, type, NULL, iid, index, offset);
} else {
phi = new (C,region->req()) PhiNode(region, type);
}
uint old_unique = C->unique();
for( uint i = 1; i < region->req(); i++ ) {
Node *x;