hotspot/src/share/vm/opto/graphKit.cpp
changeset 6456 7e5f1fcd6519
parent 6418 6671edbd230e
child 7390 a7b7f5f168ac
equal deleted inserted replaced
6455:4a8142e5f75f 6456:7e5f1fcd6519
  1737 
  1737 
  1738   // Replace all the old call edges with the edges from the inlining result
  1738   // Replace all the old call edges with the edges from the inlining result
  1739   C->gvn_replace_by(callprojs.fallthrough_catchproj, final_state->in(TypeFunc::Control));
  1739   C->gvn_replace_by(callprojs.fallthrough_catchproj, final_state->in(TypeFunc::Control));
  1740   C->gvn_replace_by(callprojs.fallthrough_memproj,   final_state->in(TypeFunc::Memory));
  1740   C->gvn_replace_by(callprojs.fallthrough_memproj,   final_state->in(TypeFunc::Memory));
  1741   C->gvn_replace_by(callprojs.fallthrough_ioproj,    final_state->in(TypeFunc::I_O));
  1741   C->gvn_replace_by(callprojs.fallthrough_ioproj,    final_state->in(TypeFunc::I_O));
       
  1742   Node* final_mem = final_state->in(TypeFunc::Memory);
  1742 
  1743 
  1743   // Replace the result with the new result if it exists and is used
  1744   // Replace the result with the new result if it exists and is used
  1744   if (callprojs.resproj != NULL && result != NULL) {
  1745   if (callprojs.resproj != NULL && result != NULL) {
  1745     C->gvn_replace_by(callprojs.resproj, result);
  1746     C->gvn_replace_by(callprojs.resproj, result);
  1746   }
  1747   }
  1774   }
  1775   }
  1775 
  1776 
  1776   // Disconnect the call from the graph
  1777   // Disconnect the call from the graph
  1777   call->disconnect_inputs(NULL);
  1778   call->disconnect_inputs(NULL);
  1778   C->gvn_replace_by(call, C->top());
  1779   C->gvn_replace_by(call, C->top());
       
  1780 
       
  1781   // Clean up any MergeMems that feed other MergeMems since the
       
  1782   // optimizer doesn't like that.
       
  1783   if (final_mem->is_MergeMem()) {
       
  1784     Node_List wl;
       
  1785     for (SimpleDUIterator i(final_mem); i.has_next(); i.next()) {
       
  1786       Node* m = i.get();
       
  1787       if (m->is_MergeMem() && !wl.contains(m)) {
       
  1788         wl.push(m);
       
  1789       }
       
  1790     }
       
  1791     while (wl.size()  > 0) {
       
  1792       _gvn.transform(wl.pop());
       
  1793     }
       
  1794   }
  1779 }
  1795 }
  1780 
  1796 
  1781 
  1797 
  1782 //------------------------------increment_counter------------------------------
  1798 //------------------------------increment_counter------------------------------
  1783 // for statistics: increment a VM counter by 1
  1799 // for statistics: increment a VM counter by 1