13#ifndef LLVM_SUPPORT_MUTEX_H
14#define LLVM_SUPPORT_MUTEX_H
27 template<
bool mt_only>
29 std::recursive_mutex impl;
30 unsigned acquired = 0;
53 assert(acquired &&
"Lock not acquired before release!");
60 return impl.try_lock();
68 template <
bool mt_only>
place backedge safepoints impl
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
SmartMutex - A mutex with a compile time constant parameter that indicates whether this mutex should ...
SmartScopedLock< false > ScopedLock
SmartMutex< false > Mutex
Mutex - A standard, always enforced mutex.
std::lock_guard< SmartMutex< mt_only > > SmartScopedLock
This is an optimization pass for GlobalISel generic memory operations.
constexpr bool llvm_is_multithreaded()
Returns true if LLVM is compiled with support for multi-threading, and false otherwise.