6890673: Eliminate allocations immediately after EA

Try to eliminate allocations and related locks immediately after escape analysis.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2011-11-16 09:13:57 -08:00
parent 81c085a1e2
commit 8d2ee23293
11 changed files with 148 additions and 71 deletions

View file

@ -1711,11 +1711,22 @@ void Compile::Optimize() {
if (failing()) return;
// Optimize out fields loads from scalar replaceable allocations.
igvn.optimize();
print_method("Iter GVN after EA", 2);
if (failing()) return;
if (congraph() != NULL && macro_count() > 0) {
PhaseMacroExpand mexp(igvn);
mexp.eliminate_macro_nodes();
igvn.set_delay_transform(false);
igvn.optimize();
print_method("Iter GVN after eliminating allocations and locks", 2);
if (failing()) return;
}
}
// Loop transforms on the ideal graph. Range Check Elimination,