OSDN Git Service

Revert "Make clang the default compiler on host."
authorIan Rogers <irogers@google.com>
Sat, 8 Mar 2014 07:50:13 +0000 (07:50 +0000)
committerIan Rogers <irogers@google.com>
Sat, 8 Mar 2014 07:50:13 +0000 (07:50 +0000)
This reverts commit 87f8b4cf0c1d6aab3eb5d1e99cc4e7cf175ef772.

Change-Id: I91a513042f0f9cf66288a296ad4a3b5da7830c7b

build/Android.common.mk
compiler/dex/frontend.cc
compiler/dex/verification_results.cc
compiler/dex/verification_results.h
compiler/driver/compiler_driver.h
runtime/thread_list.h

index 07f5cd3..f58aabc 100644 (file)
@@ -93,7 +93,11 @@ LLVM_ROOT_PATH := external/llvm
 
 # Clang build support.
 ART_TARGET_CLANG := false
-ART_HOST_CLANG := true
+ifeq ($(HOST_OS),darwin)
+  ART_HOST_CLANG := true
+else
+  ART_HOST_CLANG := false
+endif
 
 # directory used for dalvik-cache on device
 ART_DALVIK_CACHE_DIR := /data/dalvik-cache
index 3bd71d1..243395a 100644 (file)
@@ -144,12 +144,6 @@ 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());
 
@@ -216,6 +210,9 @@ 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);
index a7f67e7..6b0875c 100644 (file)
 namespace art {
 
 VerificationResults::VerificationResults(const CompilerOptions* compiler_options)
-    : verified_methods_lock_("compiler verified methods lock"),
+    : compiler_options_(compiler_options),
+      verified_methods_lock_("compiler verified methods lock"),
       verified_methods_(),
       rejected_classes_lock_("compiler rejected classes lock"),
       rejected_classes_() {
-  UNUSED(compiler_options);
 }
 
 VerificationResults::~VerificationResults() {
index 7fdf767..278182f 100644 (file)
@@ -56,6 +56,8 @@ class VerificationResults {
                                    const uint32_t access_flags);
 
   private:
+    const CompilerOptions* compiler_options_;
+
     // Verified methods.
     typedef SafeMap<MethodReference, const VerifiedMethod*,
         MethodReferenceComparator> VerifiedMethodMap;
index 817da17..12463a9 100644 (file)
@@ -564,11 +564,8 @@ class CompilerDriver {
   class ProfileData {
    public:
     ProfileData() : count_(0), method_size_(0), percent_(0) {}
-    ProfileData(const std::string& method_name, uint32_t count, uint32_t method_size, double percent) :
+    ProfileData(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; }
index a574340..58bd92a 100644 (file)
@@ -90,8 +90,9 @@ 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()