14#include "llvm/Config/config.h"
23 static std::recursive_mutex m;
28 void (*Deleter)(
void*))
const {
33 if (!
Ptr.load(std::memory_order_relaxed)) {
34 void *Tmp = Creator();
36 Ptr.store(Tmp, std::memory_order_release);
45 "Partially initialized ManagedStatic!?");
58 "Not destroyed in reverse order of construction?");
static std::recursive_mutex * getManagedStaticMutex()
static const ManagedStaticBase * StaticList
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ManagedStaticBase - Common base class for ManagedStatic instances.
void RegisterManagedStatic(void *(*creator)(), void(*deleter)(void *)) const
void(* DeleterFn)(void *)
const ManagedStaticBase * Next
std::atomic< void * > Ptr
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.
void llvm_shutdown()
llvm_shutdown - Deallocate and destroy all ManagedStatic variables.