diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-14 18:37:08 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-18 10:03:48 +0000 |
commit | f5df8974173124faddb8e2b6a331959afdb94fdf (patch) | |
tree | 26114bf466b445c60176b06a2f8a01f1e14e9358 /compiler/sea_ir | |
parent | 32a6c7f3bd76bbe574675d44b7d8076995690a5b (diff) | |
download | art-f5df8974173124faddb8e2b6a331959afdb94fdf.zip art-f5df8974173124faddb8e2b6a331959afdb94fdf.tar.gz art-f5df8974173124faddb8e2b6a331959afdb94fdf.tar.bz2 |
Rewrite the compiler interface for CompilerDriver.
Change-Id: I15fa9afe7ffb7283ebda8d788a1e02793e3f75a6
Diffstat (limited to 'compiler/sea_ir')
-rw-r--r-- | compiler/sea_ir/frontend.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/compiler/sea_ir/frontend.cc b/compiler/sea_ir/frontend.cc index 6c779c8..b57007b 100644 --- a/compiler/sea_ir/frontend.cc +++ b/compiler/sea_ir/frontend.cc @@ -38,15 +38,12 @@ namespace art { static CompiledMethod* CompileMethodWithSeaIr(CompilerDriver& compiler, - const CompilerBackend compiler_backend, + CompilerBackend* compiler_backend, const DexFile::CodeItem* code_item, uint32_t method_access_flags, InvokeType invoke_type, uint16_t class_def_idx, uint32_t method_idx, - jobject class_loader, const DexFile& dex_file -#if defined(ART_USE_PORTABLE_COMPILER) - , llvm::LlvmCompilationUnit* llvm_compilation_unit -#endif -) { + jobject class_loader, const DexFile& dex_file, + void* llvm_compilation_unit) { LOG(INFO) << "Compiling " << PrettyMethod(method_idx, dex_file) << "."; sea_ir::SeaGraph* ir_graph = sea_ir::SeaGraph::GetGraph(dex_file); std::string symbol = "dex_" + MangleForJni(PrettyMethod(method_idx, dex_file)); @@ -65,7 +62,7 @@ static CompiledMethod* CompileMethodWithSeaIr(CompilerDriver& compiler, } CompiledMethod* SeaIrCompileOneMethod(CompilerDriver& compiler, - const CompilerBackend backend, + CompilerBackend* backend, const DexFile::CodeItem* code_item, uint32_t method_access_flags, InvokeType invoke_type, @@ -73,13 +70,9 @@ CompiledMethod* SeaIrCompileOneMethod(CompilerDriver& compiler, uint32_t method_idx, jobject class_loader, const DexFile& dex_file, - llvm::LlvmCompilationUnit* llvm_compilation_unit) { + void* llvm_compilation_unit) { return CompileMethodWithSeaIr(compiler, backend, code_item, method_access_flags, invoke_type, - class_def_idx, method_idx, class_loader, dex_file -#if defined(ART_USE_PORTABLE_COMPILER) - , llvm_compilation_unit -#endif - ); // NOLINT + class_def_idx, method_idx, class_loader, dex_file, llvm_compilation_unit); } extern "C" art::CompiledMethod* @@ -90,7 +83,7 @@ extern "C" art::CompiledMethod* const art::DexFile& dex_file) { // TODO: Check method fingerprint here to determine appropriate backend type. // Until then, use build default - art::CompilerBackend backend = compiler.GetCompilerBackend(); + art::CompilerBackend* backend = compiler.GetCompilerBackend(); return art::SeaIrCompileOneMethod(compiler, backend, code_item, method_access_flags, invoke_type, class_def_idx, method_idx, class_loader, dex_file, NULL /* use thread llvm_info */); |