1.1 --- a/src/share/vm/opto/compile.cpp Wed Mar 05 11:33:31 2008 -0800 1.2 +++ b/src/share/vm/opto/compile.cpp Thu Mar 06 10:30:17 2008 -0800 1.3 @@ -333,6 +333,12 @@ 1.4 tty->print_cr("** Bailout: Recompile without subsuming loads **"); 1.5 tty->print_cr("*********************************************************"); 1.6 } 1.7 + if (_do_escape_analysis != DoEscapeAnalysis && PrintOpto) { 1.8 + // Recompiling without escape analysis 1.9 + tty->print_cr("*********************************************************"); 1.10 + tty->print_cr("** Bailout: Recompile without escape analysis **"); 1.11 + tty->print_cr("*********************************************************"); 1.12 + } 1.13 if (env()->break_at_compile()) { 1.14 // Open the debugger when compiing this method. 1.15 tty->print("### Breaking when compiling: "); 1.16 @@ -415,7 +421,7 @@ 1.17 // the continuation bci for on stack replacement. 1.18 1.19 1.20 -Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, bool subsume_loads ) 1.21 +Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, bool subsume_loads, bool do_escape_analysis ) 1.22 : Phase(Compiler), 1.23 _env(ci_env), 1.24 _log(ci_env->log()), 1.25 @@ -430,6 +436,7 @@ 1.26 _for_igvn(NULL), 1.27 _warm_calls(NULL), 1.28 _subsume_loads(subsume_loads), 1.29 + _do_escape_analysis(do_escape_analysis), 1.30 _failure_reason(NULL), 1.31 _code_buffer("Compile::Fill_buffer"), 1.32 _orig_pc_slot(0), 1.33 @@ -487,7 +494,7 @@ 1.34 PhaseGVN gvn(node_arena(), estimated_size); 1.35 set_initial_gvn(&gvn); 1.36 1.37 - if (DoEscapeAnalysis) 1.38 + if (_do_escape_analysis) 1.39 _congraph = new ConnectionGraph(this); 1.40 1.41 { // Scope for timing the parser 1.42 @@ -577,6 +584,8 @@ 1.43 if (_congraph != NULL) { 1.44 NOT_PRODUCT( TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, TimeCompiler); ) 1.45 _congraph->compute_escape(); 1.46 + if (failing()) return; 1.47 + 1.48 #ifndef PRODUCT 1.49 if (PrintEscapeAnalysis) { 1.50 _congraph->dump(); 1.51 @@ -675,6 +684,7 @@ 1.52 _orig_pc_slot(0), 1.53 _orig_pc_slot_offset_in_bytes(0), 1.54 _subsume_loads(true), 1.55 + _do_escape_analysis(false), 1.56 _failure_reason(NULL), 1.57 _code_buffer("Compile::Fill_buffer"), 1.58 _node_bundling_limit(0), 1.59 @@ -822,7 +832,7 @@ 1.60 // Type::update_loaded_types(_method, _method->constants()); 1.61 1.62 // Init alias_type map. 1.63 - if (!DoEscapeAnalysis && aliaslevel == 3) 1.64 + if (!_do_escape_analysis && aliaslevel == 3) 1.65 aliaslevel = 2; // No unique types without escape analysis 1.66 _AliasLevel = aliaslevel; 1.67 const int grow_ats = 16;