--- a/hotspot/src/share/vm/opto/c2compiler.cpp Wed Mar 05 11:33:31 2008 -0800
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp Thu Mar 06 10:30:17 2008 -0800
@@ -35,6 +35,9 @@
const char* C2Compiler::retry_no_subsuming_loads() {
return "retry without subsuming loads";
}
+const char* C2Compiler::retry_no_escape_analysis() {
+ return "retry without escape analysis";
+}
void C2Compiler::initialize_runtime() {
// Check assumptions used while running ADLC
@@ -101,17 +104,23 @@
initialize();
}
bool subsume_loads = true;
+ bool do_escape_analysis = DoEscapeAnalysis;
while (!env->failing()) {
// Attempt to compile while subsuming loads into machine instructions.
- Compile C(env, this, target, entry_bci, subsume_loads);
+ Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis);
// Check result and retry if appropriate.
if (C.failure_reason() != NULL) {
- if (C.failure_reason_is(retry_no_subsuming_loads())) {
+ if (C.failure_reason_is(retry_no_subsuming_loads())) {
assert(subsume_loads, "must make progress");
subsume_loads = false;
continue; // retry
}
+ if (C.failure_reason_is(retry_no_escape_analysis())) {
+ assert(do_escape_analysis, "must make progress");
+ do_escape_analysis = false;
+ continue; // retry
+ }
// Pass any other failure reason up to the ciEnv.
// Note that serious, irreversible failures are already logged
// on the ciEnv via env->record_method_not_compilable().