Mercurial > hg > truffle
comparison src/share/vm/opto/c2compiler.cpp @ 38:b789bcaf2dd9
6667610: (Escape Analysis) retry compilation without EA if it fails
Summary: During split unique types EA could exceed nodes limit and fail the method compilation.
Reviewed-by: rasbold
author | kvn |
---|---|
date | Thu, 06 Mar 2008 10:30:17 -0800 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
37:73970d8c0b27 | 38:b789bcaf2dd9 |
---|---|
32 extern const char register_save_policy[]; | 32 extern const char register_save_policy[]; |
33 extern const int register_save_type[]; | 33 extern const int register_save_type[]; |
34 | 34 |
35 const char* C2Compiler::retry_no_subsuming_loads() { | 35 const char* C2Compiler::retry_no_subsuming_loads() { |
36 return "retry without subsuming loads"; | 36 return "retry without subsuming loads"; |
37 } | |
38 const char* C2Compiler::retry_no_escape_analysis() { | |
39 return "retry without escape analysis"; | |
37 } | 40 } |
38 void C2Compiler::initialize_runtime() { | 41 void C2Compiler::initialize_runtime() { |
39 | 42 |
40 // Check assumptions used while running ADLC | 43 // Check assumptions used while running ADLC |
41 Compile::adlc_verification(); | 44 Compile::adlc_verification(); |
99 int entry_bci) { | 102 int entry_bci) { |
100 if (!is_initialized()) { | 103 if (!is_initialized()) { |
101 initialize(); | 104 initialize(); |
102 } | 105 } |
103 bool subsume_loads = true; | 106 bool subsume_loads = true; |
107 bool do_escape_analysis = DoEscapeAnalysis; | |
104 while (!env->failing()) { | 108 while (!env->failing()) { |
105 // Attempt to compile while subsuming loads into machine instructions. | 109 // Attempt to compile while subsuming loads into machine instructions. |
106 Compile C(env, this, target, entry_bci, subsume_loads); | 110 Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis); |
107 | 111 |
108 // Check result and retry if appropriate. | 112 // Check result and retry if appropriate. |
109 if (C.failure_reason() != NULL) { | 113 if (C.failure_reason() != NULL) { |
110 if (C.failure_reason_is(retry_no_subsuming_loads())) { | 114 if (C.failure_reason_is(retry_no_subsuming_loads())) { |
111 assert(subsume_loads, "must make progress"); | 115 assert(subsume_loads, "must make progress"); |
112 subsume_loads = false; | 116 subsume_loads = false; |
117 continue; // retry | |
118 } | |
119 if (C.failure_reason_is(retry_no_escape_analysis())) { | |
120 assert(do_escape_analysis, "must make progress"); | |
121 do_escape_analysis = false; | |
113 continue; // retry | 122 continue; // retry |
114 } | 123 } |
115 // Pass any other failure reason up to the ciEnv. | 124 // Pass any other failure reason up to the ciEnv. |
116 // Note that serious, irreversible failures are already logged | 125 // Note that serious, irreversible failures are already logged |
117 // on the ciEnv via env->record_method_not_compilable(). | 126 // on the ciEnv via env->record_method_not_compilable(). |