am fbe5b757: Fix LLVM build. Otherwise, function not used warning.
* commit 'fbe5b757cff040a455f93388d6eebdee0653a089':
Fix LLVM build. Otherwise, function not used warning.
diff --git a/src/compiler.cc b/src/compiler.cc
index 155e8be..ccedf5d 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -316,13 +316,14 @@
compiler_(NULL),
compiler_context_(NULL),
jni_compiler_(NULL),
- create_invoke_stub_(NULL)
-#if defined(ART_USE_LLVM_COMPILER)
- , compiler_enable_auto_elf_loading_(NULL),
+#if !defined(ART_USE_LLVM_COMPILER)
+ create_invoke_stub_(NULL) {
+#else
+ create_invoke_stub_(NULL),
+ compiler_enable_auto_elf_loading_(NULL),
compiler_get_method_code_addr_(NULL),
- compiler_get_method_invoke_stub_addr_(NULL)
+ compiler_get_method_invoke_stub_addr_(NULL) {
#endif
-{
std::string compiler_so_name(MakeCompilerSoName(instruction_set_));
compiler_library_ = dlopen(compiler_so_name.c_str(), RTLD_LAZY);
if (compiler_library_ == NULL) {
diff --git a/src/compiler/codegen/GenInvoke.cc b/src/compiler/codegen/GenInvoke.cc
index a904419..d8f1cd4 100644
--- a/src/compiler/codegen/GenInvoke.cc
+++ b/src/compiler/codegen/GenInvoke.cc
@@ -669,7 +669,7 @@
oatFreeTemp(cUnit, regPtr);
storeValue(cUnit, rlDest, rlResult);
if (rangeCheck) {
- launchPad->operands[2] = NULL; // no resumption
+ launchPad->operands[2] = 0; // no resumption
launchPad->operands[3] = (uintptr_t)bb;
}
// Record that we've already inlined & null checked
@@ -858,7 +858,7 @@
(intptr_t)launchPad);
opCmpImmBranch(cUnit, kCondEq, regCmp, 0, launchPad);
opReg(cUnit, kOpBlx, rTgt);
- launchPad->operands[2] = NULL; // No return possible
+ launchPad->operands[2] = 0; // No return possible
launchPad->operands[3] = (uintptr_t)bb;
// Record that we've already inlined & null checked
mir->optimizationFlags |= (MIR_INLINED | MIR_IGNORE_NULL_CHECK);
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc
index b976fd2..9ee40b6 100644
--- a/src/compiler_llvm/compilation_unit.cc
+++ b/src/compiler_llvm/compilation_unit.cc
@@ -198,7 +198,6 @@
target_options.NoFramePointerElim = true;
target_options.NoFramePointerElimNonLeaf = true;
target_options.UseSoftFloat = false;
- target_options.EnableFastISel = true;
// Create the llvm::TargetMachine
llvm::TargetMachine* target_machine =
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index 6017ddb..9b2ba76 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -214,7 +214,7 @@
UniquePtr<SirtRef<ClassLoader> > class_loader(new SirtRef<ClassLoader>(NULL));
if (class_loader.get() == NULL) {
LOG(ERROR) << "Failed to create SirtRef for class loader";
- return false;
+ return NULL;
}
if (!boot_image_option.empty()) {
diff --git a/src/native/java_lang_Runtime.cc b/src/native/java_lang_Runtime.cc
index 1b5520b..4789f4e 100644
--- a/src/native/java_lang_Runtime.cc
+++ b/src/native/java_lang_Runtime.cc
@@ -32,11 +32,8 @@
Runtime::Current()->GetHeap()->CollectGarbage(false);
}
-static void Runtime_nativeExit(JNIEnv*, jclass, jint status, jboolean isExit) {
- // isExit is true for System.exit and false for System.halt.
- if (isExit) {
- Runtime::Current()->CallExitHook(status);
- }
+static void Runtime_nativeExit(JNIEnv*, jclass, jint status) {
+ Runtime::Current()->CallExitHook(status);
exit(status);
}
@@ -80,7 +77,7 @@
NATIVE_METHOD(Runtime, freeMemory, "()J"),
NATIVE_METHOD(Runtime, gc, "()V"),
NATIVE_METHOD(Runtime, maxMemory, "()J"),
- NATIVE_METHOD(Runtime, nativeExit, "(IZ)V"),
+ NATIVE_METHOD(Runtime, nativeExit, "(I)V"),
NATIVE_METHOD(Runtime, nativeLoad, "(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/String;"),
NATIVE_METHOD(Runtime, totalMemory, "()J"),
};
diff --git a/src/stack.cc b/src/stack.cc
index 5dda584..d724a72 100644
--- a/src/stack.cc
+++ b/src/stack.cc
@@ -102,13 +102,8 @@
*/
int Frame::GetVRegOffset(const DexFile::CodeItem* code_item,
uint32_t core_spills, uint32_t fp_spills,
- size_t frame_size, int reg)
-{
-#if defined(ART_USE_LLVM_COMPILER)
- LOG(FATAL) << "LLVM compiler don't support this function";
- return 0;
-#else
- DCHECK_EQ( frame_size & (kStackAlignment - 1), 0U);
+ size_t frame_size, int reg) {
+ DCHECK_EQ(frame_size & (kStackAlignment - 1), 0U);
int num_spills = __builtin_popcount(core_spills) + __builtin_popcount(fp_spills) + 1 /* filler */;
int num_ins = code_item->ins_size_;
int num_regs = code_item->registers_size_ - num_ins;
@@ -122,7 +117,6 @@
} else {
return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + sizeof(uint32_t); // Dalvik in
}
-#endif
}
uint32_t Frame::GetVReg(const DexFile::CodeItem* code_item, uint32_t core_spills,