mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6667610: (Escape Analysis) retry compilation without EA if it fails
During split unique types EA could exceed nodes limit and fail the method compilation. Reviewed-by: rasbold
This commit is contained in:
parent
17458c9660
commit
bf7f5e1887
7 changed files with 57 additions and 11 deletions
|
@ -35,6 +35,9 @@ extern const int register_save_type[];
|
|||
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 @@ void C2Compiler::compile_method(ciEnv* env,
|
|||
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().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue