diff options
author | 2017-09-27 11:25:01 -0700 | |
---|---|---|
committer | 2017-09-27 11:25:01 -0700 | |
commit | 9e1478795fb0dbb126213311b0b4483898c079e3 (patch) | |
tree | f7ed13ffa1fde3e5c31d25419f28ebbbe72d9e4d /compiler/optimizing/optimizing_compiler.cc | |
parent | e5b35ed787fbfb388d162361310bae5b0e7682a7 (diff) |
Enables GVN for x86 and x86_64.
Rationale:
As decided after the MIPS change, this change unifies our
six code generators again a bit (we cannot move it into
the generic path, since arm likes to run the simplifier
first). Generally the GVN does some last minute cleanup
(such as finding CSE in the runtime tests generated
by dynamic BCE). I started a golem run to find impact.
Test: test-art-host test-art-target
Change-Id: Ib4098c5bae2269e71fee95cc31e3662d3aa47f6a
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 10b3fe1731..12185866cd 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -669,10 +669,10 @@ void OptimizingCompiler::RunArchOptimizations(InstructionSet instruction_set, #endif #ifdef ART_ENABLE_CODEGEN_mips case kMips: { - mips::PcRelativeFixups* pc_relative_fixups = - new (arena) mips::PcRelativeFixups(graph, codegen, stats); SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph); GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects, "GVN$after_arch"); + mips::PcRelativeFixups* pc_relative_fixups = + new (arena) mips::PcRelativeFixups(graph, codegen, stats); HOptimization* mips_optimizations[] = { side_effects, gvn, @@ -696,11 +696,15 @@ void OptimizingCompiler::RunArchOptimizations(InstructionSet instruction_set, #endif #ifdef ART_ENABLE_CODEGEN_x86 case kX86: { + SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph); + GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects, "GVN$after_arch"); x86::PcRelativeFixups* pc_relative_fixups = new (arena) x86::PcRelativeFixups(graph, codegen, stats); x86::X86MemoryOperandGeneration* memory_gen = new (arena) x86::X86MemoryOperandGeneration(graph, codegen, stats); HOptimization* x86_optimizations[] = { + side_effects, + gvn, pc_relative_fixups, memory_gen }; @@ -710,9 +714,13 @@ void OptimizingCompiler::RunArchOptimizations(InstructionSet instruction_set, #endif #ifdef ART_ENABLE_CODEGEN_x86_64 case kX86_64: { + SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph); + GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects, "GVN$after_arch"); x86::X86MemoryOperandGeneration* memory_gen = new (arena) x86::X86MemoryOperandGeneration(graph, codegen, stats); HOptimization* x86_64_optimizations[] = { + side_effects, + gvn, memory_gen }; RunOptimizations(x86_64_optimizations, arraysize(x86_64_optimizations), pass_observer); |