diff options
| author | 2016-07-13 16:37:34 +0000 | |
|---|---|---|
| committer | 2016-07-13 16:37:34 +0000 | |
| commit | a70835569128786877caa64c4e1978e734ff0768 (patch) | |
| tree | e7ca7ee9517983ede563a338c0372f3aad9476b6 /compiler/optimizing/optimizing_compiler.cc | |
| parent | c8cbda659671b111e309fe123cb2d4887e4edd10 (diff) | |
| parent | ee8d971b14edfc1e0af9436fd223277df966e4c2 (diff) | |
Merge "X86: Use memory to do array range checks"
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
| -rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index d703b0f94f..d6e09d7acb 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -37,6 +37,10 @@ #include "pc_relative_fixups_x86.h" #endif +#if defined(ART_ENABLE_CODEGEN_x86) || defined(ART_ENABLE_CODEGEN_x86_64) +#include "x86_memory_gen.h" +#endif + #include "art_method-inl.h" #include "base/arena_allocator.h" #include "base/arena_containers.h" @@ -485,13 +489,27 @@ static void RunArchOptimizations(InstructionSet instruction_set, case kX86: { x86::PcRelativeFixups* pc_relative_fixups = new (arena) x86::PcRelativeFixups(graph, codegen, stats); + x86::X86MemoryOperandGeneration* memory_gen = + new(arena) x86::X86MemoryOperandGeneration(graph, stats, codegen); HOptimization* x86_optimizations[] = { - pc_relative_fixups + pc_relative_fixups, + memory_gen }; RunOptimizations(x86_optimizations, arraysize(x86_optimizations), pass_observer); break; } #endif +#ifdef ART_ENABLE_CODEGEN_x86_64 + case kX86_64: { + x86::X86MemoryOperandGeneration* memory_gen = + new(arena) x86::X86MemoryOperandGeneration(graph, stats, codegen); + HOptimization* x86_64_optimizations[] = { + memory_gen + }; + RunOptimizations(x86_64_optimizations, arraysize(x86_64_optimizations), pass_observer); + break; + } +#endif default: break; } |