summaryrefslogtreecommitdiff
path: root/src/compiler_llvm
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler_llvm')
-rw-r--r--src/compiler_llvm/compilation_unit.h2
-rw-r--r--src/compiler_llvm/compiler_llvm.cc19
-rw-r--r--src/compiler_llvm/gbc_expander.cc8
3 files changed, 21 insertions, 8 deletions
diff --git a/src/compiler_llvm/compilation_unit.h b/src/compiler_llvm/compilation_unit.h
index 591d4f0a31..6ebac9aa68 100644
--- a/src/compiler_llvm/compilation_unit.h
+++ b/src/compiler_llvm/compilation_unit.h
@@ -29,7 +29,7 @@
#include "safe_map.h"
#if defined(ART_USE_PORTABLE_COMPILER)
-# include "compiler/Dalvik.h"
+# include "compiler/compiler_internals.h"
# include "compiler.h"
# include "oat_compilation_unit.h"
#endif
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
diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc
index 93d7d48ab3..0f71512e5d 100644
--- a/src/compiler_llvm/gbc_expander.cc
+++ b/src/compiler_llvm/gbc_expander.cc
@@ -45,7 +45,7 @@ using namespace art::compiler_llvm;
using art::greenland::IntrinsicHelper;
namespace art {
-extern char remapShorty(char shortyType);
+extern char RemapShorty(char shortyType);
};
namespace {
@@ -2485,7 +2485,7 @@ llvm::FunctionType* GBCExpanderPass::GetFunctionType(uint32_t method_idx,
char ret_shorty = shorty[0];
#if defined(ART_USE_PORTABLE_COMPILER)
- ret_shorty = art::remapShorty(ret_shorty);
+ ret_shorty = art::RemapShorty(ret_shorty);
#endif
llvm::Type* ret_type = irb_.getJType(ret_shorty, kAccurate);
@@ -2500,7 +2500,7 @@ llvm::FunctionType* GBCExpanderPass::GetFunctionType(uint32_t method_idx,
for (uint32_t i = 1; i < shorty_size; ++i) {
#if defined(ART_USE_PORTABLE_COMPILER)
- char shorty_type = art::remapShorty(shorty[i]);
+ char shorty_type = art::RemapShorty(shorty[i]);
args_type.push_back(irb_.getJType(shorty_type, kAccurate));
#else
args_type.push_back(irb_.getJType(shorty[i], kAccurate));
@@ -2635,7 +2635,7 @@ llvm::BasicBlock* GBCExpanderPass::GetUnwindBasicBlock() {
// Emit the code to return default value (zero) for the given return type.
char ret_shorty = oat_compilation_unit_->GetShorty()[0];
#if defined(ART_USE_PORTABLE_COMPILER)
- ret_shorty = art::remapShorty(ret_shorty);
+ ret_shorty = art::RemapShorty(ret_shorty);
#endif
if (ret_shorty == 'V') {
irb_.CreateRetVoid();