From 02ca05a5a6e3f5028c6c2987a81be481d07bc617 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 12 May 2020 13:58:51 +0100 Subject: 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 --- compiler/optimizing/select_generator.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/select_generator.cc') diff --git a/compiler/optimizing/select_generator.cc b/compiler/optimizing/select_generator.cc index dcc7f77fc2..54053820ca 100644 --- a/compiler/optimizing/select_generator.cc +++ b/compiler/optimizing/select_generator.cc @@ -24,11 +24,9 @@ namespace art { static constexpr size_t kMaxInstructionsInBranch = 1u; HSelectGenerator::HSelectGenerator(HGraph* graph, - VariableSizedHandleScope* handles, OptimizingCompilerStats* stats, const char* name) - : HOptimization(graph, name, stats), - handle_scope_(handles) { + : HOptimization(graph, name, stats) { } // Returns true if `block` has only one predecessor, ends with a Goto @@ -163,7 +161,7 @@ bool HSelectGenerator::Run() { if (both_successors_return) { if (true_value->GetType() == DataType::Type::kReference) { DCHECK(false_value->GetType() == DataType::Type::kReference); - ReferenceTypePropagation::FixUpInstructionType(select, handle_scope_); + ReferenceTypePropagation::FixUpInstructionType(select, graph_->GetHandleCache()); } } else if (phi->GetType() == DataType::Type::kReference) { select->SetReferenceTypeInfo(phi->GetReferenceTypeInfo()); -- cgit v1.2.3-59-g8ed1b