Mercurial > hg > truffle
diff src/share/vm/opto/compile.cpp @ 1634:60a14ad85270
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
Summary: Execute IGVN optimization before and after Escape Analysis
Reviewed-by: never
author | kvn |
---|---|
date | Fri, 02 Jul 2010 17:30:30 -0700 |
parents | 4311f23817fd |
children | 0e35fa8ebccd |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp Fri Jul 02 15:01:47 2010 -0700 +++ b/src/share/vm/opto/compile.cpp Fri Jul 02 17:30:30 2010 -0700 @@ -637,34 +637,6 @@ if (failing()) return; NOT_PRODUCT( verify_graph_edges(); ) - // Perform escape analysis - if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) { - TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true); - // Add ConP#NULL and ConN#NULL nodes before ConnectionGraph construction. - PhaseGVN* igvn = initial_gvn(); - Node* oop_null = igvn->zerocon(T_OBJECT); - Node* noop_null = igvn->zerocon(T_NARROWOOP); - - _congraph = new(comp_arena()) ConnectionGraph(this); - bool has_non_escaping_obj = _congraph->compute_escape(); - -#ifndef PRODUCT - if (PrintEscapeAnalysis) { - _congraph->dump(); - } -#endif - // Cleanup. - if (oop_null->outcnt() == 0) - igvn->hash_delete(oop_null); - if (noop_null->outcnt() == 0) - igvn->hash_delete(noop_null); - - if (!has_non_escaping_obj) { - _congraph = NULL; - } - - if (failing()) return; - } // Now optimize Optimize(); if (failing()) return; @@ -1601,6 +1573,20 @@ if (failing()) return; + // Perform escape analysis + if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) { + TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true); + ConnectionGraph::do_analysis(this, &igvn); + + if (failing()) return; + + igvn.optimize(); + print_method("Iter GVN 3", 2); + + if (failing()) return; + + } + // Loop transforms on the ideal graph. Range Check Elimination, // peeling, unrolling, etc.