From de479be99328d2113bf483e082c9ecf235a34d69 Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Thu, 31 May 2012 08:03:26 -0700 Subject: Refactor runtime support builder. Also, add inline assembly for load offset from current thread. Change-Id: I5c32c04a5ab9a8574acbaf8ee3e08761ebe33d4f --- src/compiler_llvm/ir_builder.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/compiler_llvm/ir_builder.h') diff --git a/src/compiler_llvm/ir_builder.h b/src/compiler_llvm/ir_builder.h index 46c37f18ad..f21cfaf1d3 100644 --- a/src/compiler_llvm/ir_builder.h +++ b/src/compiler_llvm/ir_builder.h @@ -120,8 +120,8 @@ class IRBuilder : public LLVMIRBuilder { StoreToObjectOffset(object_addr, offset, new_value, tbaa_.GetMemoryJType(special_ty, j_ty)); } - void SetTBAACall(llvm::CallInst* call_inst, TBAASpecialType special_ty) { - call_inst->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_.GetSpecialType(special_ty)); + void SetTBAA(llvm::Instruction* inst, TBAASpecialType special_ty) { + inst->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_.GetSpecialType(special_ty)); } @@ -217,10 +217,16 @@ class IRBuilder : public LLVMIRBuilder { // Runtime Helper Function //-------------------------------------------------------------------------- + RuntimeSupportBuilder& Runtime() { + return *runtime_support_; + } + + // TODO: Deprecate llvm::Function* GetRuntime(runtime_support::RuntimeId rt) { return runtime_support_->GetRuntimeSupportFunction(rt); } + // TODO: Deprecate void SetRuntimeSupport(RuntimeSupportBuilder* runtime_support) { // Can only set once. We can't do this on constructor, because RuntimeSupportBuilder needs // IRBuilder. -- cgit v1.2.3-59-g8ed1b