mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6934604: enable parts of EliminateAutoBox by default
Resurrected autobox elimination code and enabled part of it by default. Reviewed-by: roland, twisti
This commit is contained in:
parent
7c367a6025
commit
b4977e887a
48 changed files with 5776 additions and 501 deletions
|
@ -125,9 +125,10 @@ void C2Compiler::compile_method(ciEnv* env,
|
|||
bool subsume_loads = SubsumeLoads;
|
||||
bool do_escape_analysis = DoEscapeAnalysis &&
|
||||
!env->jvmti_can_access_local_variables();
|
||||
bool eliminate_boxing = EliminateAutoBox;
|
||||
while (!env->failing()) {
|
||||
// Attempt to compile while subsuming loads into machine instructions.
|
||||
Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis);
|
||||
Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing);
|
||||
|
||||
|
||||
// Check result and retry if appropriate.
|
||||
|
@ -142,6 +143,12 @@ void C2Compiler::compile_method(ciEnv* env,
|
|||
do_escape_analysis = false;
|
||||
continue; // retry
|
||||
}
|
||||
if (C.has_boxed_value()) {
|
||||
// Recompile without boxing elimination regardless failure reason.
|
||||
assert(eliminate_boxing, "must make progress");
|
||||
eliminate_boxing = 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