diff options
| author | 2015-08-10 15:30:07 -0700 | |
|---|---|---|
| committer | 2015-08-18 11:21:05 -0700 | |
| commit | 50fa993d67f8a20322c27c1a77e7efcf826531fc (patch) | |
| tree | 76d6b73a9d8a8ef2709aef6c01778af6a0d4ada1 /compiler/optimizing/code_generator.cc | |
| parent | 4500fcbe682d666a24c2e8f6e0cb90cfb35d3fa3 (diff) | |
Svelter libart-compiler
Added new environment variable ART_{TARGET,HOST}_CODEGEN_ARCHS which
may be set to 'all', 'svelte' or a space separated list of architectures.
When compiled with ART_{TARGET,HOST}_CODEGEN_ARCHS='all' (the default
value) dex2oat will be able to generate output for all supported
architectures.
When compiled with ART_TARGET_CODEGEN_ARCHS='svelte'
only the architectures of the TARGET will be included. When
ART_HOST_CODEGEN_ARCHS='svelte' all architectures the target includes
and the host architectures will be included on the host dex2oat.
If a list of architectures is given only those will be included.
Change-Id: I87f4ad0131ab1b37544d8799e947ce4733b6daec
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
| -rw-r--r-- | compiler/optimizing/code_generator.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 4607ebe548..eba9f36b6a 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -16,11 +16,26 @@ #include "code_generator.h" +#ifdef ART_ENABLE_CODEGEN_arm #include "code_generator_arm.h" +#endif + +#ifdef ART_ENABLE_CODEGEN_arm64 #include "code_generator_arm64.h" +#endif + +#ifdef ART_ENABLE_CODEGEN_x86 #include "code_generator_x86.h" +#endif + +#ifdef ART_ENABLE_CODEGEN_x86_64 #include "code_generator_x86_64.h" +#endif + +#ifdef ART_ENABLE_CODEGEN_mips64 #include "code_generator_mips64.h" +#endif + #include "compiled_method.h" #include "dex/verified_method.h" #include "driver/dex_compilation_unit.h" @@ -31,6 +46,7 @@ #include "mirror/array-inl.h" #include "mirror/object_array-inl.h" #include "mirror/object_reference.h" +#include "parallel_move_resolver.h" #include "ssa_liveness_analysis.h" #include "utils/assembler.h" #include "verifier/dex_gc_map.h" @@ -516,34 +532,49 @@ CodeGenerator* CodeGenerator::Create(HGraph* graph, const InstructionSetFeatures& isa_features, const CompilerOptions& compiler_options) { switch (instruction_set) { +#ifdef ART_ENABLE_CODEGEN_arm case kArm: case kThumb2: { return new arm::CodeGeneratorARM(graph, *isa_features.AsArmInstructionSetFeatures(), compiler_options); } +#endif +#ifdef ART_ENABLE_CODEGEN_arm64 case kArm64: { return new arm64::CodeGeneratorARM64(graph, *isa_features.AsArm64InstructionSetFeatures(), compiler_options); } +#endif +#ifdef ART_ENABLE_CODEGEN_mips case kMips: + UNUSED(compiler_options); + UNUSED(graph); + UNUSED(isa_features); return nullptr; +#endif +#ifdef ART_ENABLE_CODEGEN_mips64 case kMips64: { return new mips64::CodeGeneratorMIPS64(graph, *isa_features.AsMips64InstructionSetFeatures(), compiler_options); } +#endif +#ifdef ART_ENABLE_CODEGEN_x86 case kX86: { return new x86::CodeGeneratorX86(graph, *isa_features.AsX86InstructionSetFeatures(), compiler_options); } +#endif +#ifdef ART_ENABLE_CODEGEN_x86_64 case kX86_64: { return new x86_64::CodeGeneratorX86_64(graph, *isa_features.AsX86_64InstructionSetFeatures(), compiler_options); } +#endif default: return nullptr; } |