diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2021-08-02 11:06:47 +0200 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2021-08-02 13:29:46 +0200 |
commit | 9e3e97aa810acac7b8ecffa7d4a92f55966e5358 (patch) | |
tree | 69faa87f45c07902ce8942462a6103e0f250e725 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | 46a861af3d1c77f28b414e6d96890fc2d0cf8538 (diff) | |
download | llvm-9e3e97aa810acac7b8ecffa7d4a92f55966e5358.zip llvm-9e3e97aa810acac7b8ecffa7d4a92f55966e5358.tar.gz llvm-9e3e97aa810acac7b8ecffa7d4a92f55966e5358.tar.bz2 |
tsan: refactor MetaMap::GetAndLock interface
Don't lock the sync object inside of MetaMap methods.
This has several advantages:
- the new interface does not confuse thread-safety analysis
so we can remove a bunch of NO_THREAD_SAFETY_ANALYSIS attributes
- this allows use of scoped lock objects
- this allows more flexibility, e.g. locking some other mutex
between searching and locking the sync object
Also prefix the methods with GetSync to be consistent with GetBlock method.
Also make interface wrappers inlinable, otherwise we either end up with
2 copies of the method, or with an additional call.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D107256
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions