Mercurial > hg > graal-compiler
diff src/share/vm/opto/compile.cpp @ 244:524eca34ea76
6684714: Optimize EA Connection Graph build performance
Summary: switch on EA by default, optimize Connection Graph construction
Reviewed-by: rasbold, never
author | kvn |
---|---|
date | Thu, 03 Jul 2008 18:02:47 -0700 |
parents | 1dd146f17531 |
children | 4a4c365f777d |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp Wed Jul 02 15:38:47 2008 -0400 +++ b/src/share/vm/opto/compile.cpp Thu Jul 03 18:02:47 2008 -0700 @@ -583,18 +583,22 @@ NOT_PRODUCT( verify_graph_edges(); ) // Perform escape analysis - if (_do_escape_analysis) - _congraph = new ConnectionGraph(this); - if (_congraph != NULL) { - NOT_PRODUCT( TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, TimeCompiler); ) - _congraph->compute_escape(); - if (failing()) return; + if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) { + TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true); + + _congraph = new(comp_arena()) ConnectionGraph(this); + bool has_non_escaping_obj = _congraph->compute_escape(); #ifndef PRODUCT if (PrintEscapeAnalysis) { _congraph->dump(); } #endif + if (!has_non_escaping_obj) { + _congraph = NULL; + } + + if (failing()) return; } // Now optimize Optimize();