Move HandleCache to HGraph.
This avoids passing the `VariableSizedHandleScope*` argument
around and eliminates HGraph::inexact_object_rti_ and its
initialization. The latter shall allow running Optimizing
gtests that do not require type information without creating
a Runtime in future. (To be implemented in a separate CL.)
Test: m test-art-host-gtest
Test: testrunner.py --host --optmizing
Test: aosp_taimen-userdebug boots.
Change-Id: I36fe9bc556c6d610d644c8c14cc74c9985a14d64
diff --git a/compiler/optimizing/optimization.cc b/compiler/optimizing/optimization.cc
index fb60c01..7483190 100644
--- a/compiler/optimizing/optimization.cc
+++ b/compiler/optimizing/optimization.cc
@@ -167,8 +167,7 @@
HGraph* graph,
OptimizingCompilerStats* stats,
CodeGenerator* codegen,
- const DexCompilationUnit& dex_compilation_unit,
- VariableSizedHandleScope* handles) {
+ const DexCompilationUnit& dex_compilation_unit) {
ArenaVector<HOptimization*> optimizations(allocator->Adapter());
// Some optimizations require SideEffectsAnalysis or HInductionVarAnalysis
@@ -243,7 +242,6 @@
codegen,
dex_compilation_unit, // outer_compilation_unit
dex_compilation_unit, // outermost_compilation_unit
- handles,
stats,
accessor.RegistersSize(),
/* total_number_of_instructions= */ 0,
@@ -253,7 +251,7 @@
break;
}
case OptimizationPass::kSelectGenerator:
- opt = new (allocator) HSelectGenerator(graph, handles, stats, pass_name);
+ opt = new (allocator) HSelectGenerator(graph, stats, pass_name);
break;
case OptimizationPass::kInstructionSimplifier:
opt = new (allocator) InstructionSimplifier(graph, codegen, stats, pass_name);