src/share/vm/opto/graphKit.cpp
Print this page
rev 3898 : 8005031: Some cleanup in c2 to prepare for incremental inlining support
Summary: collection of small changes to prepare for incremental inlining.
Reviewed-by:
*** 1769,1783 ****
// Find all the needed outputs of this call
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* final_mem = final_state->in(TypeFunc::Memory);
// Replace the result with the new result if it exists and is used
if (callprojs.resproj != NULL && result != NULL) {
C->gvn_replace_by(callprojs.resproj, result);
}
--- 1769,1793 ----
// Find all the needed outputs of this call
CallProjections callprojs;
call->extract_projections(&callprojs, true);
! 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) {
C->gvn_replace_by(callprojs.resproj, result);
}