diff options
Diffstat (limited to 'src/compiler_llvm')
| -rw-r--r-- | src/compiler_llvm/compilation_unit.cc | 14 | ||||
| -rw-r--r-- | src/compiler_llvm/compilation_unit.h | 12 | ||||
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.cc | 19 | ||||
| -rw-r--r-- | src/compiler_llvm/gbc_expander.cc | 6 |
4 files changed, 7 insertions, 44 deletions
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc index 596169b38c..78bc50d71e 100644 --- a/src/compiler_llvm/compilation_unit.cc +++ b/src/compiler_llvm/compilation_unit.cc @@ -80,11 +80,7 @@ namespace art { namespace compiler_llvm { -#if defined(ART_USE_DEXLANG_FRONTEND) -llvm::FunctionPass* -CreateGBCExpanderPass(const greenland::IntrinsicHelper& intrinsic_helper, - IRBuilder& irb); -#elif defined(ART_USE_PORTABLE_COMPILER) +#if defined(ART_USE_PORTABLE_COMPILER) llvm::FunctionPass* CreateGBCExpanderPass(const greenland::IntrinsicHelper& intrinsic_helper, IRBuilder& irb, Compiler* compiler, OatCompilationUnit* oat_compilation_unit); @@ -110,10 +106,6 @@ CompilationUnit::CompilationUnit(const CompilerLLVM* compiler_llvm, // Include the runtime function declaration makeLLVMModuleContents(module_); -#if defined(ART_USE_DEXLANG_FRONTEND) - dex_lang_ctx_ = new greenland::DexLang::Context(*module_); -#endif - // Create IRBuilder irb_.reset(new IRBuilder(*context_, *module_)); @@ -138,9 +130,7 @@ CompilationUnit::CompilationUnit(const CompilerLLVM* compiler_llvm, CompilationUnit::~CompilationUnit() { -#if defined(ART_USE_DEXLANG_FRONTEND) - delete dex_lang_ctx_; -#elif defined(ART_USE_PORTABLE_COMPILER) +#if defined(ART_USE_PORTABLE_COMPILER) llvm::LLVMContext* llvm_context = context_.release(); // Managed by llvm_info_ CHECK(llvm_context != NULL); #endif diff --git a/src/compiler_llvm/compilation_unit.h b/src/compiler_llvm/compilation_unit.h index 6ebac9aa68..b0d072b166 100644 --- a/src/compiler_llvm/compilation_unit.h +++ b/src/compiler_llvm/compilation_unit.h @@ -20,9 +20,6 @@ #include "base/logging.h" #include "base/mutex.h" #include "globals.h" -#if defined(ART_USE_DEXLANG_FRONTEND) -# include "greenland/dex_lang.h" -#endif #include "instruction_set.h" #include "runtime_support_builder.h" #include "runtime_support_func.h" @@ -80,12 +77,6 @@ class CompilationUnit { return irb_.get(); } -#if defined(ART_USE_DEXLANG_FRONTEND) - greenland::DexLang::Context* GetDexLangContext() const { - return dex_lang_ctx_; - } -#endif - void SetBitcodeFileName(const std::string& bitcode_filename) { bitcode_filename_ = bitcode_filename; } @@ -121,9 +112,6 @@ class CompilationUnit { UniquePtr<IRBuilder> irb_; UniquePtr<RuntimeSupportBuilder> runtime_support_; llvm::Module* module_; // Managed by context_ -#if defined(ART_USE_DEXLANG_FRONTEND) - greenland::DexLang::Context* dex_lang_ctx_; -#endif #if defined(ART_USE_PORTABLE_COMPILER) UniquePtr<LLVMInfo> llvm_info_; Compiler* compiler_; diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index c807b3ded7..97d005c67f 100644 --- a/src/compiler_llvm/compiler_llvm.cc +++ b/src/compiler_llvm/compiler_llvm.cc @@ -24,9 +24,7 @@ #include "compiler.h" #include "ir_builder.h" #include "jni_compiler.h" -#ifndef ART_USE_DEXLANG_FRONTEND -# include "method_compiler.h" -#endif +#include "method_compiler.h" #include "oat_compilation_unit.h" #include "oat_file.h" #include "stub_compiler.h" @@ -141,20 +139,7 @@ CompiledMethod* CompilerLLVM:: CompileDexMethod(OatCompilationUnit* oat_compilation_unit, InvokeType invoke_type) { UniquePtr<CompilationUnit> cunit(AllocateCompilationUnit()); -#if defined(ART_USE_DEXLANG_FRONTEND) - // Run DexLang for Dex to Greenland Bitcode - UniquePtr<greenland::DexLang> dex_lang( - new greenland::DexLang(*cunit->GetDexLangContext(), *compiler_, - *oat_compilation_unit)); - - llvm::Function* func = dex_lang->Build(); - CHECK(func != NULL); - - cunit->Materialize(); - - return new CompiledMethod(cunit->GetInstructionSet(), - cunit->GetCompiledCode()); -#elif defined(ART_USE_PORTABLE_COMPILER) +#if defined(ART_USE_PORTABLE_COMPILER) std::string methodName(PrettyMethod(oat_compilation_unit->GetDexMethodIndex(), *oat_compilation_unit->GetDexFile())); if (insn_set_ == kX86) { diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc index 0f71512e5d..c285c0bb97 100644 --- a/src/compiler_llvm/gbc_expander.cc +++ b/src/compiler_llvm/gbc_expander.cc @@ -1178,9 +1178,9 @@ void GBCExpanderPass::Expand_UpdateDexPC(llvm::Value* dex_pc_value) { } void GBCExpanderPass::InsertStackOverflowCheck(llvm::Function& func) { - // DexLang generates all alloca instruction in the first basic block of the - // FUNC and also there's no any alloca instructions after the first non-alloca - // instruction + // All alloca instructions are generated in the first basic block of the + // function, and there are no alloca instructions after the first non-alloca + // instruction. llvm::BasicBlock* first_basic_block = &func.front(); |