comparison src/share/vm/opto/graphKit.cpp @ 1786:f9883ee8ce39

6965815: OptimizeStringConcat: assert(!q->is_MergeMem()) failed with specjbb2000 Reviewed-by: kvn
author never
date Wed, 08 Sep 2010 20:28:57 -0700
parents 3e8fbc61cee8
children f264f4c42799
comparison
equal deleted inserted replaced
1785:5e4f03302987 1786:f9883ee8ce39
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