summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Orion Hodson <oth@google.com> 2018-03-25 20:23:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-03-25 20:23:11 +0000
commit3dada431768b980c65d8256327f160803aae1b41 (patch)
treea1ab5bafe0ac9324710f3ff8f8dc7b5473bf1ce4 /compiler/driver/compiler_driver.cc
parent2410a88a94b57247a1096562564c2f23528b3e46 (diff)
parent88591fe82f499de10591f5b77efac71f8954eae2 (diff)
Merge "ART: Simplify atomic.h"
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 53604761d1..127833233a 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1555,7 +1555,7 @@ class ParallelCompilationManager {
self->AssertNoPendingException();
CHECK_GT(work_units, 0U);
- index_.StoreRelaxed(begin);
+ index_.store(begin, std::memory_order_relaxed);
for (size_t i = 0; i < work_units; ++i) {
thread_pool_->AddTask(self, new ForAllClosureLambda<Fn>(this, end, fn));
}
@@ -1573,7 +1573,7 @@ class ParallelCompilationManager {
}
size_t NextIndex() {
- return index_.FetchAndAddSequentiallyConsistent(1);
+ return index_.fetch_add(1, std::memory_order_seq_cst);
}
private:
@@ -2838,7 +2838,8 @@ void CompilerDriver::AddCompiledMethod(const MethodReference& method_ref,
/*expected*/ nullptr,
compiled_method);
CHECK(result == MethodTable::kInsertResultSuccess);
- non_relative_linker_patch_count_.FetchAndAddRelaxed(non_relative_linker_patch_count);
+ non_relative_linker_patch_count_.fetch_add(non_relative_linker_patch_count,
+ std::memory_order_relaxed);
DCHECK(GetCompiledMethod(method_ref) != nullptr) << method_ref.PrettyMethod();
}
@@ -2949,7 +2950,7 @@ bool CompilerDriver::IsMethodVerifiedWithoutFailures(uint32_t method_idx,
}
size_t CompilerDriver::GetNonRelativeLinkerPatchCount() const {
- return non_relative_linker_patch_count_.LoadRelaxed();
+ return non_relative_linker_patch_count_.load(std::memory_order_relaxed);
}
void CompilerDriver::SetRequiresConstructorBarrier(Thread* self,