Revert "Disable optimization of Atomic::LoadJavaData for x86 targets."
This reverts commit fbd5118c1c36900910cabe89e3a73d598160e629.
Reason for revert: <INSERT REASONING HERE>
Change-Id: If7aac5e7f4e5376167e896c40f8bf30287f81dd1
diff --git a/runtime/atomic.h b/runtime/atomic.h
index 090e56a..e2a7259 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -201,11 +201,6 @@
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 @@
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.
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 0abea9f..035cead 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -14,12 +14,6 @@
* 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>