summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2015-08-18 21:43:44 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-08-18 21:43:44 +0000
commitf71ad9ede9ae322a897e8fe407208dc35c5dee65 (patch)
tree5dee2185faeebe5f4107fec6835f1013b4e7548d /compiler/optimizing/code_generator.cc
parentadd6cfac914f48136e71a05f72123154d7d2d44b (diff)
parent50fa993d67f8a20322c27c1a77e7efcf826531fc (diff)
Merge "Svelter libart-compiler"
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index d0b5ffd255..7d82f185a6 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;
}