Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
63:eac007780a58 | 64:b8f5ba577b02 |
---|---|
30 // Split Node 'n' through merge point if there is enough win. | 30 // Split Node 'n' through merge point if there is enough win. |
31 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { | 31 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { |
32 int wins = 0; | 32 int wins = 0; |
33 assert( !n->is_CFG(), "" ); | 33 assert( !n->is_CFG(), "" ); |
34 assert( region->is_Region(), "" ); | 34 assert( region->is_Region(), "" ); |
35 Node *phi = new (C, region->req()) PhiNode( region, n->bottom_type() ); | 35 |
36 const Type* type = n->bottom_type(); | |
37 const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr(); | |
38 Node *phi; | |
39 if( t_oop != NULL && t_oop->is_instance_field() ) { | |
40 int iid = t_oop->instance_id(); | |
41 int index = C->get_alias_index(t_oop); | |
42 int offset = t_oop->offset(); | |
43 phi = new (C,region->req()) PhiNode(region, type, NULL, iid, index, offset); | |
44 } else { | |
45 phi = new (C,region->req()) PhiNode(region, type); | |
46 } | |
36 uint old_unique = C->unique(); | 47 uint old_unique = C->unique(); |
37 for( uint i = 1; i < region->req(); i++ ) { | 48 for( uint i = 1; i < region->req(); i++ ) { |
38 Node *x; | 49 Node *x; |
39 Node* the_clone = NULL; | 50 Node* the_clone = NULL; |
40 if( region->in(i) == C->top() ) { | 51 if( region->in(i) == C->top() ) { |