2303 return orig_phi;
2304 }
2305 // Have we recently created a Phi for this alias index?
2306 PhiNode *result = get_map_phi(orig_phi->_idx);
2307 if (result != NULL && C->get_alias_index(result->adr_type()) == alias_idx) {
2308 return result;
2309 }
2310 // Previous check may fail when the same wide memory Phi was split into Phis
2311 // for different memory slices. Search all Phis for this region.
2312 if (result != NULL) {
2313 Node* region = orig_phi->in(0);
2314 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
2315 Node* phi = region->fast_out(i);
2316 if (phi->is_Phi() &&
2317 C->get_alias_index(phi->as_Phi()->adr_type()) == alias_idx) {
2318 assert(phi->_idx >= nodes_size(), "only new Phi per instance memory slice");
2319 return phi->as_Phi();
2320 }
2321 }
2322 }
2323 if ((int)C->unique() + 2*NodeLimitFudgeFactor > MaxNodeLimit) {
2324 if (C->do_escape_analysis() == true && !C->failing()) {
2325 // Retry compilation without escape analysis.
2326 // If this is the first failure, the sentinel string will "stick"
2327 // to the Compile object, and the C2Compiler will see it and retry.
2328 C->record_failure(C2Compiler::retry_no_escape_analysis());
2329 }
2330 return NULL;
2331 }
2332 orig_phi_worklist.append_if_missing(orig_phi);
2333 const TypePtr *atype = C->get_adr_type(alias_idx);
2334 result = PhiNode::make(orig_phi->in(0), NULL, Type::MEMORY, atype);
2335 C->copy_node_notes_to(result, orig_phi);
2336 igvn->set_type(result, result->bottom_type());
2337 record_for_optimizer(result);
2338 set_map(orig_phi, result);
2339 new_created = true;
2340 return result;
2341 }
2342
2343 //
|
2303 return orig_phi;
2304 }
2305 // Have we recently created a Phi for this alias index?
2306 PhiNode *result = get_map_phi(orig_phi->_idx);
2307 if (result != NULL && C->get_alias_index(result->adr_type()) == alias_idx) {
2308 return result;
2309 }
2310 // Previous check may fail when the same wide memory Phi was split into Phis
2311 // for different memory slices. Search all Phis for this region.
2312 if (result != NULL) {
2313 Node* region = orig_phi->in(0);
2314 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
2315 Node* phi = region->fast_out(i);
2316 if (phi->is_Phi() &&
2317 C->get_alias_index(phi->as_Phi()->adr_type()) == alias_idx) {
2318 assert(phi->_idx >= nodes_size(), "only new Phi per instance memory slice");
2319 return phi->as_Phi();
2320 }
2321 }
2322 }
2323 if ((int) (C->live_nodes() + 2*NodeLimitFudgeFactor) > MaxNodeLimit) {
2324 if (C->do_escape_analysis() == true && !C->failing()) {
2325 // Retry compilation without escape analysis.
2326 // If this is the first failure, the sentinel string will "stick"
2327 // to the Compile object, and the C2Compiler will see it and retry.
2328 C->record_failure(C2Compiler::retry_no_escape_analysis());
2329 }
2330 return NULL;
2331 }
2332 orig_phi_worklist.append_if_missing(orig_phi);
2333 const TypePtr *atype = C->get_adr_type(alias_idx);
2334 result = PhiNode::make(orig_phi->in(0), NULL, Type::MEMORY, atype);
2335 C->copy_node_notes_to(result, orig_phi);
2336 igvn->set_type(result, result->bottom_type());
2337 record_for_optimizer(result);
2338 set_map(orig_phi, result);
2339 new_created = true;
2340 return result;
2341 }
2342
2343 //
|