Go to the documentation of this file.
17 #ifndef LLVM_SUPPORT_ATOMICORDERING_H
18 #define LLVM_SUPPORT_ATOMICORDERING_H
82 static const char *names[8] = {
"not_atomic",
"unordered",
"monotonic",
83 "consume",
"acquire",
"release",
84 "acq_rel",
"seq_cst"};
85 return names[
static_cast<size_t>(ao)];
91 static const bool lookup[8][8] = {
93 {
false,
false,
false,
false,
false,
false,
false,
false},
94 {
true,
false,
false,
false,
false,
false,
false,
false},
95 {
true,
true,
false,
false,
false,
false,
false,
false},
96 {
true,
true,
true,
false,
false,
false,
false,
false},
97 {
true,
true,
true,
true,
false,
false,
false,
false},
98 {
true,
true,
true,
false,
false,
false,
false,
false},
99 {
true,
true,
true,
true,
true,
true,
false,
false},
100 {
true,
true,
true,
true,
true,
true,
true,
false},
102 return lookup[
static_cast<size_t>(AO)][
static_cast<size_t>(
Other)];
106 static const bool lookup[8][8] = {
108 {
true,
false,
false,
false,
false,
false,
false,
false},
109 {
true,
true,
false,
false,
false,
false,
false,
false},
110 {
true,
true,
true,
false,
false,
false,
false,
false},
111 {
true,
true,
true,
true,
false,
false,
false,
false},
112 {
true,
true,
true,
true,
true,
false,
false,
false},
113 {
true,
true,
true,
false,
false,
true,
false,
false},
114 {
true,
true,
true,
true,
true,
true,
true,
false},
115 {
true,
true,
true,
true,
true,
true,
true,
true},
117 return lookup[
static_cast<size_t>(AO)][
static_cast<size_t>(
Other)];
157 return lookup[
static_cast<size_t>(AO)];
162 #endif // LLVM_SUPPORT_ATOMICORDERING_H
This is an optimization pass for GlobalISel generic memory operations.
bool operator<=(int64_t V1, const APSInt &V2)
AtomicOrdering getMergedAtomicOrdering(AtomicOrdering AO, AtomicOrdering Other)
Return a single atomic ordering that is at least as strong as both the AO and Other orderings for an ...
bool isAtLeastOrStrongerThan(AtomicOrdering AO, AtomicOrdering Other)
AtomicOrderingCABI
Atomic ordering for C11 / C++11's memory models.
bool isValidAtomicOrdering(Int I)
AtomicOrdering
Atomic ordering for LLVM's memory model.
bool operator>=(int64_t V1, const APSInt &V2)
bool isStrongerThanUnordered(AtomicOrdering AO)
bool operator<(int64_t V1, const APSInt &V2)
bool isValidAtomicOrderingCABI(Int I)
bool isAcquireOrStronger(AtomicOrdering AO)
AtomicOrderingCABI toCABI(AtomicOrdering AO)
bool isReleaseOrStronger(AtomicOrdering AO)
bool isStrongerThan(AtomicOrdering AO, AtomicOrdering Other)
Returns true if ao is stronger than other as defined by the AtomicOrdering lattice,...
static bool lookup(const GsymReader &GR, DataExtractor &Data, uint64_t &Offset, uint64_t BaseAddr, uint64_t Addr, SourceLocations &SrcLocs, llvm::Error &Err)
A Lookup helper functions.
bool isStrongerThanMonotonic(AtomicOrdering AO)
bool operator>(int64_t V1, const APSInt &V2)
const char * toIRString(AtomicOrdering ao)
String used by LLVM IR to represent atomic ordering.
Optional< std::vector< StOtherPiece > > Other