[all-commits] [llvm/llvm-project] e8ce5f: [bolt] Use llvm::sys::RWMutex instead of std::shar...
Nico Weber via All-commits
all-commits at lists.llvm.org
Mon Nov 21 16:25:01 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e8ce5f1ec9f399669274000cb90d3a8214285194
https://github.com/llvm/llvm-project/commit/e8ce5f1ec9f399669274000cb90d3a8214285194
Author: Nico Weber <thakis at chromium.org>
Date: 2022-11-21 (Mon, 21 Nov 2022)
Changed paths:
M bolt/include/bolt/Core/BinaryContext.h
M bolt/include/bolt/Core/BinaryFunction.h
M bolt/include/bolt/Passes/Aligner.h
M bolt/include/bolt/Passes/Instrumentation.h
M bolt/lib/Core/BinaryBasicBlock.cpp
M bolt/lib/Core/BinaryContext.cpp
M bolt/lib/Core/Exceptions.cpp
M bolt/lib/Core/ParallelUtilities.cpp
M bolt/lib/Passes/Aligner.cpp
M bolt/lib/Passes/Instrumentation.cpp
Log Message:
-----------
[bolt] Use llvm::sys::RWMutex instead of std::shared_timed_mutex
This has the following advantages:
- std::shared_timed_mutex is macOS 10.12+ only. llvm::sys::RWMutex
automatically switches to a different implementation internally
when targeting older macOS versions.
- bolt only needs std::shared_mutex, not std::shared_timed_mutex.
llvm::sys::RWMutex automatically uses std::shared_mutex internally
where available.
std::shared_mutex and RWMutex have the same API, so no code changes
other than types and includes are needed.
Differential Revision: https://reviews.llvm.org/D138423
More information about the All-commits
mailing list