From d668a06b5dcc3b0f7f788da4d756cd4ee6f1d0fa Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Fri, 13 Apr 2012 12:36:57 -0700 Subject: Implement runtime support inlining. Change-Id: I8608b246a4dfde9959b5b86872f65dfa61646c84 --- src/compiler_llvm/ir_builder.cc | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'src/compiler_llvm/ir_builder.cc') diff --git a/src/compiler_llvm/ir_builder.cc b/src/compiler_llvm/ir_builder.cc index 1a27d0258f..4afb8bc887 100644 --- a/src/compiler_llvm/ir_builder.cc +++ b/src/compiler_llvm/ir_builder.cc @@ -15,7 +15,6 @@ */ #include "ir_builder.h" -#include "runtime_support_func.h" #include "stringprintf.h" #include @@ -44,41 +43,7 @@ IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) art_frame_type_ = module.getTypeByName("ShadowFrame"); CHECK(art_frame_type_ != NULL); - // Load the runtime support function declaration from module - InitRuntimeSupportFuncDecl(); -} - - -//---------------------------------------------------------------------------- -// Runtime Helper Function -//---------------------------------------------------------------------------- - -void IRBuilder::InitRuntimeSupportFuncDecl() { - using namespace runtime_support; - -#define GET_RUNTIME_SUPPORT_FUNC_DECL(ID, NAME) \ - do { \ - llvm::Function* fn = module_->getFunction(#NAME); \ - DCHECK_NE(fn, (void*)NULL) << "Function not found: " << #NAME; \ - runtime_support_func_decls_[ID] = fn; \ - } while (0); - -#include "runtime_support_func_list.h" - RUNTIME_SUPPORT_FUNC_LIST(GET_RUNTIME_SUPPORT_FUNC_DECL) -#undef RUNTIME_SUPPORT_FUNC_LIST -#undef GET_RUNTIME_SUPPORT_FUNC_DECL -} - - -llvm::Function* IRBuilder::GetRuntime(runtime_support::RuntimeId rt) const { - using namespace runtime_support; - - if (rt >= 0 && rt < MAX_ID) { - return runtime_support_func_decls_[rt]; - } else { - LOG(ERROR) << "Unknown runtime function id: " << rt; - return NULL; - } + runtime_support_ = NULL; } -- cgit v1.2.3-59-g8ed1b