128 /*
129 if( u->is_Start() ) {
130 tty->print_cr("Region has inlined start use");
131 } else {
132 tty->print_cr("Region has odd use");
133 u->dump(2);
134 }*/
135 return NULL;
136 }
137 if( u != phi ) {
138 // CNC - do not allow any other merged value
139 //tty->print_cr("Merging another value");
140 //u->dump(2);
141 return NULL;
142 }
143 // Make sure we can account for all Phi uses
144 for (DUIterator_Fast kmax, k = u->fast_outs(kmax); k < kmax; k++) {
145 Node* v = u->fast_out(k); // User of the phi
146 // CNC - Allow only really simple patterns.
147 // In particular I disallow AddP of the Phi, a fairly common pattern
148 if( v == cmp ) continue; // The compare is OK
149 if( (v->is_ConstraintCast()) &&
150 v->in(0)->in(0) == iff )
151 continue; // CastPP/II of the IfNode is OK
152 // Disabled following code because I cannot tell if exactly one
153 // path dominates without a real dominator check. CNC 9/9/1999
154 //uint vop = v->Opcode();
155 //if( vop == Op_Phi ) { // Phi from another merge point might be OK
156 // Node *r = v->in(0); // Get controlling point
157 // if( !r ) return NULL; // Degraded to a copy
158 // // Find exactly one path in (either True or False doms, but not IFF)
159 // int cnt = 0;
160 // for( uint i = 1; i < r->req(); i++ )
161 // if( r->in(i) && r->in(i)->in(0) == iff )
162 // cnt++;
163 // if( cnt == 1 ) continue; // Exactly one of True or False guards Phi
164 //}
165 if( !v->is_Call() ) {
166 /*
167 if( v->Opcode() == Op_AddP ) {
168 tty->print_cr("Phi has AddP use");
169 } else if( v->Opcode() == Op_CastPP ) {
170 tty->print_cr("Phi has CastPP use");
171 } else if( v->Opcode() == Op_CastII ) {
|
128 /*
129 if( u->is_Start() ) {
130 tty->print_cr("Region has inlined start use");
131 } else {
132 tty->print_cr("Region has odd use");
133 u->dump(2);
134 }*/
135 return NULL;
136 }
137 if( u != phi ) {
138 // CNC - do not allow any other merged value
139 //tty->print_cr("Merging another value");
140 //u->dump(2);
141 return NULL;
142 }
143 // Make sure we can account for all Phi uses
144 for (DUIterator_Fast kmax, k = u->fast_outs(kmax); k < kmax; k++) {
145 Node* v = u->fast_out(k); // User of the phi
146 // CNC - Allow only really simple patterns.
147 // In particular I disallow AddP of the Phi, a fairly common pattern
148 if (v == cmp) continue; // The compare is OK
149 if (v->is_ConstraintCast()) {
150 // If the cast is derived from data flow edges, it may not have a control.
151 // If so, it should be save to split. But follow-up code can not deal with
152 // this (l. 359). So skip.
153 if (v->in(0) == NULL) {
154 return NULL;
155 }
156 if (v->in(0)->in(0) == iff) {
157 continue; // CastPP/II of the IfNode is OK
158 }
159 }
160 // Disabled following code because I cannot tell if exactly one
161 // path dominates without a real dominator check. CNC 9/9/1999
162 //uint vop = v->Opcode();
163 //if( vop == Op_Phi ) { // Phi from another merge point might be OK
164 // Node *r = v->in(0); // Get controlling point
165 // if( !r ) return NULL; // Degraded to a copy
166 // // Find exactly one path in (either True or False doms, but not IFF)
167 // int cnt = 0;
168 // for( uint i = 1; i < r->req(); i++ )
169 // if( r->in(i) && r->in(i)->in(0) == iff )
170 // cnt++;
171 // if( cnt == 1 ) continue; // Exactly one of True or False guards Phi
172 //}
173 if( !v->is_Call() ) {
174 /*
175 if( v->Opcode() == Op_AddP ) {
176 tty->print_cr("Phi has AddP use");
177 } else if( v->Opcode() == Op_CastPP ) {
178 tty->print_cr("Phi has CastPP use");
179 } else if( v->Opcode() == Op_CastII ) {
|