diff options
author | 2015-10-19 16:19:23 +0100 | |
---|---|---|
committer | 2015-10-23 17:18:35 +0100 | |
commit | 4e5dd521063beae1706410419f19c7e224db50fe (patch) | |
tree | 734842d330aca6b97ec2e042d54d32ac004288a3 /compiler/optimizing/optimizing_compiler.cc | |
parent | 9926d886573d13ab3f97befae4c526b936de8a53 (diff) |
Run type propagation after inliner only when needed.
Currently we run a type propagation pass unconditionally after the
inliner. This change looks at the returned value (if any) and runs a
minimal type propagation only if its type has changed.
Change-Id: I0dd72bd481219081e8a978d2632426afc980d73a
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 5404e56a5b..8459331fd6 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -388,19 +388,9 @@ static void MaybeRunInliner(HGraph* graph, return; } - ArenaAllocator* arena = graph->GetArena(); - HInliner* inliner = new (arena) HInliner( + HInliner* inliner = new (graph->GetArena()) HInliner( graph, dex_compilation_unit, dex_compilation_unit, driver, handles, stats); - 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, - }; + HOptimization* optimizations[] = { inliner }; RunOptimizations(optimizations, arraysize(optimizations), pass_observer); } |