summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/compiler_llvm.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2012-12-21 11:16:29 -0800
committer buzbee <buzbee@google.com> 2013-01-08 14:38:02 -0800
commit26f10eed520942d3db754c31941e457048475f61 (patch)
tree6b0bdd82479c1a6d8fed05071b1990df5840e803 /src/compiler_llvm/compiler_llvm.cc
parent1a25aa432314bcf008c11e3514afc0b7aeb64d5c (diff)
Fix Portable build
A previous change broke the ability to compile the Portable build. Instead of building Portable, we unwittingly were building Iceland. This CL fixes that, along with some bitrot unknowingly introduced by subsequent CLs. In particular, the debugger support change to add an intrinsic call to associate value definitions with the original Dalvik VReg broke llvm's Phi constraint. Fixed. However, problems remain. Though the build is now fixed, CLs subsequent to the makefile breakage broke the Portable llvm backend. This CL will shift all Portable compilations to Iceland while the new breakage is being addressed. Change-Id: I7b08b26ed653a7b477f0ae9a226b7ee09c6b3398
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.cc')
-rw-r--r--src/compiler_llvm/compiler_llvm.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index 6de10e6940..29c381d143 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -164,6 +164,18 @@ CompileDexMethod(OatCompilationUnit* oat_compilation_unit, InvokeType invoke_typ
return method_compiler->Compile();
} else {
+
+#if 1
+ /*
+ * FIXME: temporary workaround
+ * Until Portable/llvm is fixed, use Iceland.
+ */
+ UniquePtr<MethodCompiler> method_compiler(
+ new MethodCompiler(cunit.get(), compiler_, oat_compilation_unit));
+
+ return method_compiler->Compile();
+#endif
+
// TODO: consolidate ArtCompileMethods
CompileOneMethod(*compiler_,
kPortable,
@@ -181,9 +193,10 @@ CompileDexMethod(OatCompilationUnit* oat_compilation_unit, InvokeType invoke_typ
cunit->Materialize();
- Compiler::MethodReference mref(dex_file_, method_idx_);
- return new CompiledMethod(cunit_->GetInstructionSet(),
- cunit_->GetCompiledCode(),
+ Compiler::MethodReference mref(oat_compilation_unit->GetDexFile(),
+ oat_compilation_unit->GetDexMethodIndex());
+ return new CompiledMethod(compiler_->GetInstructionSet(),
+ cunit->GetCompiledCode(),
*verifier::MethodVerifier::GetDexGcMap(mref));
}
#else