OSDN Git Service

Merge "Revert "Disable optimization of Atomic::LoadJavaData for x86 targets.""
authorBrian Carlstrom <bdc@google.com>
Thu, 26 Jan 2017 08:05:34 +0000 (08:05 +0000)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Thu, 26 Jan 2017 08:05:36 +0000 (08:05 +0000)
runtime/atomic.h
runtime/class_linker.cc

index 090e56a..e2a7259 100644 (file)
@@ -201,11 +201,6 @@ class PACKED(sizeof(T)) Atomic : public std::atomic<T> {
     return this->load(std::memory_order_acquire);
   }
 
-  // Disable optimizations for Atomic::LoadJavaData on x86 devices.
-  // Bug: http://b/34287931
-#if defined(DISABLE_LOAD_JAVA_DATA_OPTIMIZATIONS)
-  #pragma clang optimize off
-#endif
   // Word tearing allowed, but may race.
   // TODO: Optimize?
   // There has been some discussion of eventually disallowing word
@@ -213,9 +208,6 @@ class PACKED(sizeof(T)) Atomic : public std::atomic<T> {
   T LoadJavaData() const {
     return this->load(std::memory_order_relaxed);
   }
-#if defined(DISABLE_LOAD_JAVA_DATA_OPTIMIZATIONS)
-  #pragma clang optimize on
-#endif
 
   // Load from memory with a total ordering.
   // Corresponds exactly to a Java volatile load.
index efbce3d..02b26c6 100644 (file)
  * limitations under the License.
  */
 
-// Disable optimizations for Atomic::LoadJavaData on x86 devices.
-// Bug: http://b/34287931
-#if defined(__i386__)
-#define DISABLE_LOAD_JAVA_DATA_OPTIMIZATIONS
-#endif
-
 #include "class_linker.h"
 
 #include <algorithm>