summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-03-06 12:13:39 -0800
committer Ian Rogers <irogers@google.com> 2014-03-06 19:16:01 -0800
commit719d1a33f6569864f529e5a3fff59e7bca97aad0 (patch)
treefcd84efd7b9806b93ec1a44e2317e6f882e7fe0e /compiler
parent5365eea9940269b662cfbe103caa348816ff1558 (diff)
Enable annotalysis on clang ART builds.
Fix clang build errors aswell as restructure locking/mutex code for correct thread safety analysis support. Reorder make dependencies so that host builds build first as they should provide better compilation errors than target. Remove host's use of -fno-omit-frame-pointer as it has no value with correct use of CFI, which we should have. Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
Diffstat (limited to 'compiler')
-rw-r--r--compiler/Android.mk12
-rw-r--r--compiler/common_compiler_test.h10
-rw-r--r--compiler/dex/quick/dex_file_method_inliner.cc1
-rw-r--r--compiler/dex/quick/dex_file_method_inliner.h1
-rw-r--r--compiler/dex/verified_method.h1
-rw-r--r--compiler/elf_writer.h1
-rw-r--r--compiler/trampolines/trampoline_compiler.h1
-rw-r--r--compiler/utils/arm64/managed_register_arm64.cc8
8 files changed, 17 insertions, 18 deletions
diff --git a/compiler/Android.mk b/compiler/Android.mk
index 499f23f6a5..e3c1958a19 100644
--- a/compiler/Android.mk
+++ b/compiler/Android.mk
@@ -260,12 +260,6 @@ $$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PAT
endef
-ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
- $(eval $(call build-libart-compiler,target,ndebug))
-endif
-ifeq ($(ART_BUILD_TARGET_DEBUG),true)
- $(eval $(call build-libart-compiler,target,debug))
-endif
ifeq ($(WITH_HOST_DALVIK),true)
# We always build dex2oat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target.
ifeq ($(ART_BUILD_NDEBUG),true)
@@ -275,6 +269,12 @@ ifeq ($(WITH_HOST_DALVIK),true)
$(eval $(call build-libart-compiler,host,debug))
endif
endif
+ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
+ $(eval $(call build-libart-compiler,target,ndebug))
+endif
+ifeq ($(ART_BUILD_TARGET_DEBUG),true)
+ $(eval $(call build-libart-compiler,target,debug))
+endif
# Rule to build /system/lib/libcompiler_rt.a
# Usually static libraries are not installed on the device.
diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h
index bca72b872b..def7b681dc 100644
--- a/compiler/common_compiler_test.h
+++ b/compiler/common_compiler_test.h
@@ -35,9 +35,9 @@ namespace art {
// A signal handler called when have an illegal instruction. We record the fact in
// a global boolean and then increment the PC in the signal context to return to
// the next instruction. We know the instruction is an sdiv (4 bytes long).
-static void baddivideinst(int signo, siginfo *si, void *data) {
- (void)signo;
- (void)si;
+static inline void baddivideinst(int signo, siginfo *si, void *data) {
+ UNUSED(signo);
+ UNUSED(si);
struct ucontext *uc = (struct ucontext *)data;
struct sigcontext *sc = &uc->uc_mcontext;
sc->arm_r0 = 0; // set R0 to #0 to signal error
@@ -56,7 +56,7 @@ static void baddivideinst(int signo, siginfo *si, void *data) {
extern "C" bool CheckForARMSDIVInstruction();
-static InstructionSetFeatures GuessInstructionFeatures() {
+static inline InstructionSetFeatures GuessInstructionFeatures() {
InstructionSetFeatures f;
// Uncomment this for processing of /proc/cpuinfo.
@@ -107,7 +107,7 @@ static InstructionSetFeatures GuessInstructionFeatures() {
// Given a set of instruction features from the build, parse it. The
// input 'str' is a comma separated list of feature names. Parse it and
// return the InstructionSetFeatures object.
-static InstructionSetFeatures ParseFeatureList(std::string str) {
+static inline InstructionSetFeatures ParseFeatureList(std::string str) {
InstructionSetFeatures result;
typedef std::vector<std::string> FeatureList;
FeatureList features;
diff --git a/compiler/dex/quick/dex_file_method_inliner.cc b/compiler/dex/quick/dex_file_method_inliner.cc
index cb424d9169..7423393e13 100644
--- a/compiler/dex/quick/dex_file_method_inliner.cc
+++ b/compiler/dex/quick/dex_file_method_inliner.cc
@@ -18,7 +18,6 @@
#include "base/macros.h"
#include "base/mutex.h"
#include "base/mutex-inl.h"
-#include "locks.h"
#include "thread.h"
#include "thread-inl.h"
#include "dex/mir_graph.h"
diff --git a/compiler/dex/quick/dex_file_method_inliner.h b/compiler/dex/quick/dex_file_method_inliner.h
index b4d8dd6009..4aff01c066 100644
--- a/compiler/dex/quick/dex_file_method_inliner.h
+++ b/compiler/dex/quick/dex_file_method_inliner.h
@@ -23,7 +23,6 @@
#include "safe_map.h"
#include "dex/compiler_enums.h"
#include "dex_file.h"
-#include "locks.h"
namespace art {
diff --git a/compiler/dex/verified_method.h b/compiler/dex/verified_method.h
index aa0e72a5ca..257e70ce93 100644
--- a/compiler/dex/verified_method.h
+++ b/compiler/dex/verified_method.h
@@ -19,6 +19,7 @@
#include <vector>
+#include "base/mutex.h"
#include "method_reference.h"
#include "safe_map.h"
diff --git a/compiler/elf_writer.h b/compiler/elf_writer.h
index 3610d1a8b2..03b965acf7 100644
--- a/compiler/elf_writer.h
+++ b/compiler/elf_writer.h
@@ -23,6 +23,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/mutex.h"
#include "os.h"
namespace art {
diff --git a/compiler/trampolines/trampoline_compiler.h b/compiler/trampolines/trampoline_compiler.h
index 21245db70d..cb5aa273bd 100644
--- a/compiler/trampolines/trampoline_compiler.h
+++ b/compiler/trampolines/trampoline_compiler.h
@@ -20,7 +20,6 @@
#include <stdint.h>
#include <vector>
-#include "locks.h"
#include "driver/compiler_driver.h"
namespace art {
diff --git a/compiler/utils/arm64/managed_register_arm64.cc b/compiler/utils/arm64/managed_register_arm64.cc
index cc0b509033..de5cb8cd8d 100644
--- a/compiler/utils/arm64/managed_register_arm64.cc
+++ b/compiler/utils/arm64/managed_register_arm64.cc
@@ -27,10 +27,10 @@ namespace arm64 {
// * [W0, W15]
// * [D0, D31]
// * [S0, S31]
-static const int kNumberOfAvailableCoreRegisters = (X15 - X0) + 1;
-static const int kNumberOfAvailableWRegisters = (W15 - W0) + 1;
-static const int kNumberOfAvailableDRegisters = kNumberOfDRegisters;
-static const int kNumberOfAvailableSRegisters = kNumberOfSRegisters;
+// static const int kNumberOfAvailableCoreRegisters = (X15 - X0) + 1;
+// static const int kNumberOfAvailableWRegisters = (W15 - W0) + 1;
+// static const int kNumberOfAvailableDRegisters = kNumberOfDRegisters;
+// static const int kNumberOfAvailableSRegisters = kNumberOfSRegisters;
// Returns true if this managed-register overlaps the other managed-register.
// GP Register Bank: