diff options
author | Igor Murashkin <iam@google.com> | 2017-08-08 13:59:55 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2017-08-11 10:23:30 -0700 |
commit | 6ef45677305048c2bf0600f1c4b98a11b2cfaffb (patch) | |
tree | 9a8df6a3bebe4a6120403562c21817d775a6ef36 /compiler/optimizing/optimizing_compiler.cc | |
parent | 1e065a54845da12541572f4f149e6ab0dcd20180 (diff) |
optimizing: Add statistics for # of constructor fences added/removed
Statistics are attributed as follows:
Added because:
* HNewInstances requires a HConstructorFence following it.
* HReturn requires a HConstructorFence (for final fields) preceding it.
Removed because:
* Optimized in Load-Store-Elimination.
* Optimized in Prepare-For-Register-Allocation.
Test: art/test.py
Bug: 36656456
Change-Id: Ic119441c5151a5a840fc6532b411340e2d68e5eb
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 70bbc382b4..435ca1cad4 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -711,11 +711,12 @@ NO_INLINE // Avoid increasing caller's frame size by large stack-allocated obje static void AllocateRegisters(HGraph* graph, CodeGenerator* codegen, PassObserver* pass_observer, - RegisterAllocator::Strategy strategy) { + RegisterAllocator::Strategy strategy, + OptimizingCompilerStats* stats) { { PassScope scope(PrepareForRegisterAllocation::kPrepareForRegisterAllocationPassName, pass_observer); - PrepareForRegisterAllocation(graph).Run(); + PrepareForRegisterAllocation(graph, stats).Run(); } SsaLivenessAnalysis liveness(graph, codegen); { @@ -1035,7 +1036,8 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* arena, AllocateRegisters(graph, codegen.get(), &pass_observer, - regalloc_strategy); + regalloc_strategy, + compilation_stats_.get()); codegen->Compile(code_allocator); pass_observer.DumpDisassembly(); |