diff options
author | roland <none@none> | 2012-12-18 14:55:25 +0100 |
---|---|---|
committer | roland <none@none> | 2012-12-18 14:55:25 +0100 |
commit | a11b4f6b4f3c141b41d68a1b648825c177e3d674 (patch) | |
tree | e38c0f4b413163ed925b23688914c053c05d8248 /src/share/vm/opto/graphKit.cpp | |
parent | 3ea81d9b9b254f0b328ae0c5e03e553639a625b7 (diff) |
8005031: Some cleanup in c2 to prepare for incremental inlining support
Summary: collection of small changes to prepare for incremental inlining.
Reviewed-by: twisti, kvn
Diffstat (limited to 'src/share/vm/opto/graphKit.cpp')
-rw-r--r-- | src/share/vm/opto/graphKit.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp index ba7ec2caf..87bd928ae 100644 --- a/src/share/vm/opto/graphKit.cpp +++ b/src/share/vm/opto/graphKit.cpp @@ -1771,11 +1771,21 @@ void GraphKit::replace_call(CallNode* call, Node* result) { CallProjections callprojs; call->extract_projections(&callprojs, true); - // Replace all the old call edges with the edges from the inlining result - C->gvn_replace_by(callprojs.fallthrough_catchproj, final_state->in(TypeFunc::Control)); - C->gvn_replace_by(callprojs.fallthrough_memproj, final_state->in(TypeFunc::Memory)); - C->gvn_replace_by(callprojs.fallthrough_ioproj, final_state->in(TypeFunc::I_O)); + Node* init_mem = call->in(TypeFunc::Memory); Node* final_mem = final_state->in(TypeFunc::Memory); + Node* final_ctl = final_state->in(TypeFunc::Control); + Node* final_io = final_state->in(TypeFunc::I_O); + + // Replace all the old call edges with the edges from the inlining result + if (callprojs.fallthrough_catchproj != NULL) { + C->gvn_replace_by(callprojs.fallthrough_catchproj, final_ctl); + } + if (callprojs.fallthrough_memproj != NULL) { + C->gvn_replace_by(callprojs.fallthrough_memproj, final_mem); + } + if (callprojs.fallthrough_ioproj != NULL) { + C->gvn_replace_by(callprojs.fallthrough_ioproj, final_io); + } // Replace the result with the new result if it exists and is used if (callprojs.resproj != NULL && result != NULL) { |