Mercurial > hg > graal-compiler
comparison src/share/vm/opto/graphKit.cpp @ 20312:922c87c9aed4
8035605: Expand functionality of PredictedIntrinsicGenerator
Summary: Allow several predicates and separate intrinsic methods per one intrinsified (virtual) method.
Reviewed-by: roland
author | kvn |
---|---|
date | Tue, 10 Jun 2014 12:28:06 -0700 |
parents | 00c8a1255912 |
children | 411e30e5fbb8 |
comparison
equal
deleted
inserted
replaced
20311:b1bc1af04c6e | 20312:922c87c9aed4 |
---|---|
2433 for (MergeMemStream mms(merged_memory(), new_mem->as_MergeMem()); mms.next_non_empty2(); ) { | 2433 for (MergeMemStream mms(merged_memory(), new_mem->as_MergeMem()); mms.next_non_empty2(); ) { |
2434 Node* old_slice = mms.force_memory(); | 2434 Node* old_slice = mms.force_memory(); |
2435 Node* new_slice = mms.memory2(); | 2435 Node* new_slice = mms.memory2(); |
2436 if (old_slice != new_slice) { | 2436 if (old_slice != new_slice) { |
2437 PhiNode* phi; | 2437 PhiNode* phi; |
2438 if (new_slice->is_Phi() && new_slice->as_Phi()->region() == region) { | 2438 if (old_slice->is_Phi() && old_slice->as_Phi()->region() == region) { |
2439 phi = new_slice->as_Phi(); | 2439 if (mms.is_empty()) { |
2440 #ifdef ASSERT | 2440 // clone base memory Phi's inputs for this memory slice |
2441 if (old_slice->is_Phi() && old_slice->as_Phi()->region() == region) | 2441 assert(old_slice == mms.base_memory(), "sanity"); |
2442 old_slice = old_slice->in(new_path); | 2442 phi = PhiNode::make(region, NULL, Type::MEMORY, mms.adr_type(C)); |
2443 // Caller is responsible for ensuring that any pre-existing | 2443 _gvn.set_type(phi, Type::MEMORY); |
2444 // phis are already aware of old memory. | 2444 for (uint i = 1; i < phi->req(); i++) { |
2445 int old_path = (new_path > 1) ? 1 : 2; // choose old_path != new_path | 2445 phi->init_req(i, old_slice->in(i)); |
2446 assert(phi->in(old_path) == old_slice, "pre-existing phis OK"); | 2446 } |
2447 #endif | 2447 } else { |
2448 mms.set_memory(phi); | 2448 phi = old_slice->as_Phi(); // Phi was generated already |
2449 } | |
2449 } else { | 2450 } else { |
2450 phi = PhiNode::make(region, old_slice, Type::MEMORY, mms.adr_type(C)); | 2451 phi = PhiNode::make(region, old_slice, Type::MEMORY, mms.adr_type(C)); |
2451 _gvn.set_type(phi, Type::MEMORY); | 2452 _gvn.set_type(phi, Type::MEMORY); |
2452 phi->set_req(new_path, new_slice); | |
2453 mms.set_memory(_gvn.transform(phi)); // assume it is complete | |
2454 } | 2453 } |
2454 phi->set_req(new_path, new_slice); | |
2455 mms.set_memory(phi); | |
2455 } | 2456 } |
2456 } | 2457 } |
2457 } | 2458 } |
2458 | 2459 |
2459 //------------------------------make_slow_call_ex------------------------------ | 2460 //------------------------------make_slow_call_ex------------------------------ |