From 271743601650308c7ac5c7a3ec35025d8130a298 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Mon, 26 Oct 2015 12:38:43 +0000 Subject: Revert "Run type propagation after inliner only when needed." This reverts commit 4e5dd521063beae1706410419f19c7e224db50fe. Change-Id: I0de261d14dd3f71abe05f9bc71744820cf23b937 --- compiler/optimizing/optimizing_compiler.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 8459331fd6..5404e56a5b 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -388,9 +388,19 @@ static void MaybeRunInliner(HGraph* graph, return; } - HInliner* inliner = new (graph->GetArena()) HInliner( + ArenaAllocator* arena = graph->GetArena(); + HInliner* inliner = new (arena) HInliner( graph, dex_compilation_unit, dex_compilation_unit, driver, handles, stats); - HOptimization* optimizations[] = { inliner }; + ReferenceTypePropagation* type_propagation = + new (arena) ReferenceTypePropagation(graph, handles, + "reference_type_propagation_after_inlining"); + + HOptimization* optimizations[] = { + inliner, + // Run another type propagation phase: inlining will open up more opportunities + // to remove checkcast/instanceof and null checks. + type_propagation, + }; RunOptimizations(optimizations, arraysize(optimizations), pass_observer); } -- cgit v1.2.3-59-g8ed1b