Properly scope HLoopOptimization's allocator.
HOptimization classes do not get their destructor called,
as they are arena objects. So the scope for the optimization
allocator needs to be the Run method.
Also anticipate bisection search breakage by adding
HLoopOptimization to the list of recognized optimizations.
Change-Id: I7770989c39d5700a3b6b0a20af5d4b874dfde111
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index c2fe1b1..52d6e0b 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -488,6 +488,8 @@
return new (arena) LoadStoreElimination(graph, *most_recent_side_effects);
} else if (opt_name == SideEffectsAnalysis::kSideEffectsAnalysisPassName) {
return new (arena) SideEffectsAnalysis(graph);
+ } else if (opt_name == HLoopOptimization::kLoopOptimizationPassName) {
+ return new (arena) HLoopOptimization(graph, most_recent_induction);
#ifdef ART_ENABLE_CODEGEN_arm
} else if (opt_name == arm::DexCacheArrayFixups::kDexCacheArrayFixupsArmPassName) {
return new (arena) arm::DexCacheArrayFixups(graph, codegen, stats);