diff options
| author | 2012-06-28 21:21:45 -0700 | |
|---|---|---|
| committer | 2012-09-15 04:15:17 -0700 | |
| commit | b672d1e48b6e02bb69c7cd9bcfa7509c81514c07 (patch) | |
| tree | 1731b6e1818a90136a985fa0957bf5ebc96eaf7d /src/compiler_llvm | |
| parent | 21d28f510eb590f52810c83f1f3f37fe5f4adf46 (diff) | |
Merge iceland to greenland.
Change-Id: Ic4440a658bb2fccb558024a736d896baaf172f3c
Diffstat (limited to 'src/compiler_llvm')
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.cc | 6 | ||||
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.h | 6 | ||||
| -rw-r--r-- | src/compiler_llvm/gbc_expander.cc | 7 | ||||
| -rw-r--r-- | src/compiler_llvm/runtime_support_builder.cc | 2 |
4 files changed, 12 insertions, 9 deletions
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index dc796434df..3a1bebcd2e 100644 --- a/src/compiler_llvm/compiler_llvm.cc +++ b/src/compiler_llvm/compiler_llvm.cc @@ -116,7 +116,11 @@ CompilerLLVM::~CompilerLLVM() { CompilationUnit* CompilerLLVM::AllocateCompilationUnit() { MutexLock GUARD(num_cunits_lock_); - return new CompilationUnit(this, num_cunits_++); + CompilationUnit* cunit = new CompilationUnit(this, num_cunits_++); + if (!bitcode_filename_.empty()) { + cunit->SetBitcodeFileName(StringPrintf("%s-%zu", bitcode_filename_.c_str(), num_cunits_-1)); + } + return cunit; } diff --git a/src/compiler_llvm/compiler_llvm.h b/src/compiler_llvm/compiler_llvm.h index 24a766e2f4..4680648854 100644 --- a/src/compiler_llvm/compiler_llvm.h +++ b/src/compiler_llvm/compiler_llvm.h @@ -89,12 +89,6 @@ class CompilerLLVM { private: CompilationUnit* AllocateCompilationUnit(); - void Materialize(CompilationUnit* cunit); - - bool IsBitcodeFileNameAvailable() const { - return !bitcode_filename_.empty(); - } - Compiler* compiler_; InstructionSet insn_set_; diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc index e2b98345e5..77c1bf5aa1 100644 --- a/src/compiler_llvm/gbc_expander.cc +++ b/src/compiler_llvm/gbc_expander.cc @@ -194,8 +194,13 @@ class GBCExpanderPass : public llvm::FunctionPass { char GBCExpanderPass::ID = 0; bool GBCExpanderPass::runOnFunction(llvm::Function& func) { + // Runtime support or stub + if (func.getName().startswith("art_") || func.getName().startswith("Art")) { + return false; + } bool changed; + // TODO: Use intrinsic. changed = InsertStackOverflowCheck(func); std::list<std::pair<llvm::CallInst*, @@ -962,7 +967,7 @@ GBCExpanderPass::ExpandIntrinsic(IntrinsicHelper::IntrinsicId intr_id, switch (intr_id) { //==- Thread -----------------------------------------------------------==// case IntrinsicHelper::GetCurrentThread: { - return ExpandToRuntime(runtime_support::GetCurrentThread, call_inst); + return irb_.Runtime().EmitGetCurrentThread(); } case IntrinsicHelper::TestSuspend: { Expand_TestSuspend(call_inst); diff --git a/src/compiler_llvm/runtime_support_builder.cc b/src/compiler_llvm/runtime_support_builder.cc index 8bbac9455f..7ef8917274 100644 --- a/src/compiler_llvm/runtime_support_builder.cc +++ b/src/compiler_llvm/runtime_support_builder.cc @@ -235,7 +235,7 @@ void RuntimeSupportBuilder::OptimizeRuntimeSupport() { Function* slow_func = GetRuntimeSupportFunction(runtime_support::TestSuspend); Function* func = Function::Create(slow_func->getFunctionType(), GlobalValue::LinkOnceODRLinkage, - "test_suspend_fast", + "art_test_suspend_fast", &module_); MakeFunctionInline(func); BasicBlock* basic_block = BasicBlock::Create(context_, "entry", func); |