Mercurial > hg > truffle
diff src/share/vm/opto/loopopts.cpp @ 64:b8f5ba577b02
6673473: (Escape Analysis) Add the instance's field information to PhiNode
Summary: Avoid an infinite generation of instance's field values Phi nodes.
Reviewed-by: never
author | kvn |
---|---|
date | Thu, 13 Mar 2008 16:31:32 -0700 |
parents | e2ae28d2ce91 |
children | 8bb88f9877e5 |
line wrap: on
line diff
--- a/src/share/vm/opto/loopopts.cpp Thu Mar 13 16:06:34 2008 -0700 +++ b/src/share/vm/opto/loopopts.cpp Thu Mar 13 16:31:32 2008 -0700 @@ -32,7 +32,18 @@ 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;