summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-03-07 14:49:39 -0800
committerIan Rogers <irogers@google.com>2014-03-07 22:30:41 -0800
commit87f8b4cf0c1d6aab3eb5d1e99cc4e7cf175ef772 (patch)
tree2828105f52e2830842d4d62477bd1a613ae6b93f
parenta54ece27b9bfd651fc3173bf43ca030652306b6e (diff)
downloadart-87f8b4cf0c1d6aab3eb5d1e99cc4e7cf175ef772.zip
art-87f8b4cf0c1d6aab3eb5d1e99cc4e7cf175ef772.tar.gz
art-87f8b4cf0c1d6aab3eb5d1e99cc4e7cf175ef772.tar.bz2
Make clang the default compiler on host.
Motivation, GCC's compiler warnings are inferior to clang's. -Wthread-safety is not supported by GCC starting with version 4.7. As this change only effects the host, performance issues are an impact on host building and testing alone. Fix clang gtest building on host with BUILD_HOST_64bit. Fix clang build regressions caused by unused fields. Fix x86-64 regression caused by requirement to fire-up quick compiler even in an interpret-only environment. Long-term this code doesn't belong in the quick compiler. Change-Id: Ifc2b10177f40d0724cbbf8dab9653ac03cdd1cee
-rw-r--r--build/Android.common.mk6
-rw-r--r--compiler/dex/frontend.cc9
-rw-r--r--compiler/dex/verification_results.cc4
-rw-r--r--compiler/dex/verification_results.h2
-rw-r--r--compiler/driver/compiler_driver.h5
-rw-r--r--runtime/thread_list.h5
6 files changed, 15 insertions, 16 deletions
diff --git a/build/Android.common.mk b/build/Android.common.mk
index f58aabc..07f5cd3 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -93,11 +93,7 @@ LLVM_ROOT_PATH := external/llvm
# Clang build support.
ART_TARGET_CLANG := false
-ifeq ($(HOST_OS),darwin)
- ART_HOST_CLANG := true
-else
- ART_HOST_CLANG := false
-endif
+ART_HOST_CLANG := true
# directory used for dalvik-cache on device
ART_DALVIK_CACHE_DIR := /data/dalvik-cache
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc
index 243395a..3bd71d1 100644
--- a/compiler/dex/frontend.cc
+++ b/compiler/dex/frontend.cc
@@ -144,6 +144,12 @@ static CompiledMethod* CompileMethod(CompilerDriver& driver,
return NULL;
}
+ const CompilerOptions& compiler_options = driver.GetCompilerOptions();
+ CompilerOptions::CompilerFilter compiler_filter = compiler_options.GetCompilerFilter();
+ if (compiler_filter == CompilerOptions::kInterpretOnly) {
+ return nullptr;
+ }
+
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
CompilationUnit cu(driver.GetArenaPool());
@@ -210,9 +216,6 @@ static CompiledMethod* CompileMethod(CompilerDriver& driver,
cu.mir_graph->EnableOpcodeCounting();
}
- const CompilerOptions& compiler_options = cu.compiler_driver->GetCompilerOptions();
- CompilerOptions::CompilerFilter compiler_filter = compiler_options.GetCompilerFilter();
-
// Check early if we should skip this compilation if using the profiled filter.
if (cu.compiler_driver->ProfilePresent()) {
std::string methodname = PrettyMethod(method_idx, dex_file);
diff --git a/compiler/dex/verification_results.cc b/compiler/dex/verification_results.cc
index 6b0875c..a7f67e7 100644
--- a/compiler/dex/verification_results.cc
+++ b/compiler/dex/verification_results.cc
@@ -30,11 +30,11 @@
namespace art {
VerificationResults::VerificationResults(const CompilerOptions* compiler_options)
- : compiler_options_(compiler_options),
- verified_methods_lock_("compiler verified methods lock"),
+ : verified_methods_lock_("compiler verified methods lock"),
verified_methods_(),
rejected_classes_lock_("compiler rejected classes lock"),
rejected_classes_() {
+ UNUSED(compiler_options);
}
VerificationResults::~VerificationResults() {
diff --git a/compiler/dex/verification_results.h b/compiler/dex/verification_results.h
index 278182f..7fdf767 100644
--- a/compiler/dex/verification_results.h
+++ b/compiler/dex/verification_results.h
@@ -56,8 +56,6 @@ class VerificationResults {
const uint32_t access_flags);
private:
- const CompilerOptions* compiler_options_;
-
// Verified methods.
typedef SafeMap<MethodReference, const VerifiedMethod*,
MethodReferenceComparator> VerifiedMethodMap;
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 12463a9..817da17 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -564,8 +564,11 @@ class CompilerDriver {
class ProfileData {
public:
ProfileData() : count_(0), method_size_(0), percent_(0) {}
- ProfileData(std::string method_name, uint32_t count, uint32_t method_size, double percent) :
+ ProfileData(const std::string& method_name, uint32_t count, uint32_t method_size, double percent) :
method_name_(method_name), count_(count), method_size_(method_size), percent_(percent) {
+ // TODO: currently method_size_ and count_ are unused.
+ UNUSED(method_size_);
+ UNUSED(count_);
}
bool IsAbove(double v) const { return percent_ >= v; }
diff --git a/runtime/thread_list.h b/runtime/thread_list.h
index 58bd92a..a574340 100644
--- a/runtime/thread_list.h
+++ b/runtime/thread_list.h
@@ -90,9 +90,8 @@ class ThreadList {
LOCKS_EXCLUDED(Locks::thread_list_lock_,
Locks::thread_suspend_count_lock_);
- size_t RunCheckpointOnRunnableThreads(Closure* checkpoint_function);
- LOCKS_EXCLUDED(Locks::thread_list_lock_,
- Locks::thread_suspend_count_lock_);
+ size_t RunCheckpointOnRunnableThreads(Closure* checkpoint_function)
+ LOCKS_EXCLUDED(Locks::thread_list_lock_, Locks::thread_suspend_count_lock_);
// Suspends all threads
void SuspendAllForDebugger()