From 1f196f1c338487d53d16fb132c619d6f5941a065 Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Wed, 11 Jul 2012 20:50:22 -0700 Subject: Use MDBuilder to build metadata. Change-Id: I7e6872bf46c5e064a8cc936edfd18566610d80d5 --- src/compiler_llvm/ir_builder.cc | 20 +------------------- 1 file changed, 1 insertion(+), 19 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 d93b5885d0..8ee4f3ede8 100644 --- a/src/compiler_llvm/ir_builder.cc +++ b/src/compiler_llvm/ir_builder.cc @@ -19,8 +19,6 @@ #include -#include - namespace art { namespace compiler_llvm { @@ -30,7 +28,7 @@ namespace compiler_llvm { //---------------------------------------------------------------------------- IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) -: LLVMIRBuilder(context), module_(&module), tbaa_(context) { +: LLVMIRBuilder(context), module_(&module), mdb_(context) { // Get java object type from module llvm::Type* jobject_struct_type = module.getTypeByName("JavaObject"); @@ -46,22 +44,6 @@ IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) CHECK(art_frame_type_ != NULL); runtime_support_ = NULL; - - - // Pre-generate the MDNode for static branch prediction - llvm::Type* int32ty = llvm::Type::getInt32Ty(context); - llvm::MDString* branch_weights = llvm::MDString::get(context, "branch_weights"); - llvm::Constant* likely = llvm::ConstantInt::get(int32ty, 64); - llvm::Constant* unlikely = llvm::ConstantInt::get(int32ty, 4); - llvm::Value *opts[] = { - branch_weights, - likely, - unlikely - }; - - expect_cond_[kLikely] = llvm::MDNode::get(context, opts); - std::swap(opts[1], opts[2]); - expect_cond_[kUnlikely] = llvm::MDNode::get(context, opts); } -- cgit v1.2.3-59-g8ed1b