LLVM API Documentation
#include <Instructions.h>
Public Member Functions | |
void * | operator new (size_t s) |
AtomicCmpXchgInst (Value *Ptr, Value *Cmp, Value *NewVal, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SynchronizationScope SynchScope, Instruction *InsertBefore=nullptr) | |
AtomicCmpXchgInst (Value *Ptr, Value *Cmp, Value *NewVal, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd) | |
bool | isVolatile () const |
void | setVolatile (bool V) |
bool | isWeak () const |
Return true if this cmpxchg may spuriously fail. | |
void | setWeak (bool IsWeak) |
DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
Transparently provide more efficient getOperand methods. | |
void | setSuccessOrdering (AtomicOrdering Ordering) |
Set the ordering constraint on this cmpxchg. | |
void | setFailureOrdering (AtomicOrdering Ordering) |
void | setSynchScope (SynchronizationScope SynchScope) |
AtomicOrdering | getSuccessOrdering () const |
Returns the ordering constraint on this cmpxchg. | |
AtomicOrdering | getFailureOrdering () const |
Returns the ordering constraint on this cmpxchg. | |
SynchronizationScope | getSynchScope () const |
Value * | getPointerOperand () |
const Value * | getPointerOperand () const |
Value * | getCompareOperand () |
const Value * | getCompareOperand () const |
Value * | getNewValOperand () |
const Value * | getNewValOperand () const |
unsigned | getPointerAddressSpace () const |
Returns the address space of the pointer operand. | |
Static Public Member Functions | |
static unsigned | getPointerOperandIndex () |
static AtomicOrdering | getStrongestFailureOrdering (AtomicOrdering SuccessOrdering) |
Returns the strongest permitted ordering on failure, given the desired ordering on success. | |
static bool | classof (const Instruction *I) |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: | |
Protected Member Functions | |
AtomicCmpXchgInst * | clone_impl () const override |
AtomicCmpXchgInst - an instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there. Returns the value that was loaded.
Definition at line 480 of file Instructions.h.
AtomicCmpXchgInst::AtomicCmpXchgInst | ( | Value * | Ptr, |
Value * | Cmp, | ||
Value * | NewVal, | ||
AtomicOrdering | SuccessOrdering, | ||
AtomicOrdering | FailureOrdering, | ||
SynchronizationScope | SynchScope, | ||
Instruction * | InsertBefore = nullptr |
||
) |
Definition at line 1250 of file Instructions.cpp.
Referenced by clone_impl().
AtomicCmpXchgInst::AtomicCmpXchgInst | ( | Value * | Ptr, |
Value * | Cmp, | ||
Value * | NewVal, | ||
AtomicOrdering | SuccessOrdering, | ||
AtomicOrdering | FailureOrdering, | ||
SynchronizationScope | SynchScope, | ||
BasicBlock * | InsertAtEnd | ||
) |
Definition at line 1263 of file Instructions.cpp.
static bool llvm::AtomicCmpXchgInst::classof | ( | const Instruction * | I | ) | [inline, static] |
Definition at line 607 of file Instructions.h.
References llvm::Instruction::getOpcode().
Referenced by classof().
static bool llvm::AtomicCmpXchgInst::classof | ( | const Value * | V | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::Instruction.
Definition at line 610 of file Instructions.h.
References classof().
AtomicCmpXchgInst * AtomicCmpXchgInst::clone_impl | ( | ) | const [override, protected, virtual] |
Implements llvm::Instruction.
Definition at line 3655 of file Instructions.cpp.
References AtomicCmpXchgInst(), getFailureOrdering(), llvm::User::getOperand(), getSuccessOrdering(), getSynchScope(), isVolatile(), isWeak(), setVolatile(), and setWeak().
Transparently provide more efficient getOperand methods.
Value* llvm::AtomicCmpXchgInst::getCompareOperand | ( | ) | [inline] |
Definition at line 573 of file Instructions.h.
References llvm::User::getOperand().
Referenced by llvm::AliasAnalysis::getLocation(), and LowerAtomicCmpXchgInst().
const Value* llvm::AtomicCmpXchgInst::getCompareOperand | ( | ) | const [inline] |
Definition at line 574 of file Instructions.h.
References llvm::User::getOperand().
AtomicOrdering llvm::AtomicCmpXchgInst::getFailureOrdering | ( | ) | const [inline] |
Returns the ordering constraint on this cmpxchg.
Definition at line 559 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl().
Value* llvm::AtomicCmpXchgInst::getNewValOperand | ( | ) | [inline] |
Definition at line 576 of file Instructions.h.
References llvm::User::getOperand().
Referenced by LowerAtomicCmpXchgInst().
const Value* llvm::AtomicCmpXchgInst::getNewValOperand | ( | ) | const [inline] |
Definition at line 577 of file Instructions.h.
References llvm::User::getOperand().
unsigned llvm::AtomicCmpXchgInst::getPointerAddressSpace | ( | ) | const [inline] |
Returns the address space of the pointer operand.
Definition at line 580 of file Instructions.h.
References llvm::Type::getPointerAddressSpace(), getPointerOperand(), and llvm::Value::getType().
Value* llvm::AtomicCmpXchgInst::getPointerOperand | ( | ) | [inline] |
Definition at line 569 of file Instructions.h.
References llvm::User::getOperand().
Referenced by llvm::AliasAnalysis::getLocation(), getPointerAddressSpace(), and LowerAtomicCmpXchgInst().
const Value* llvm::AtomicCmpXchgInst::getPointerOperand | ( | ) | const [inline] |
Definition at line 570 of file Instructions.h.
References llvm::User::getOperand().
static unsigned llvm::AtomicCmpXchgInst::getPointerOperandIndex | ( | ) | [inline, static] |
Definition at line 571 of file Instructions.h.
static AtomicOrdering llvm::AtomicCmpXchgInst::getStrongestFailureOrdering | ( | AtomicOrdering | SuccessOrdering | ) | [inline, static] |
Returns the strongest permitted ordering on failure, given the desired ordering on success.
If the comparison in a cmpxchg operation fails, there is no atomic store so release semantics cannot be provided. So this function drops explicit Release requests from the AtomicOrdering. A SequentiallyConsistent operation would remain SequentiallyConsistent.
Definition at line 592 of file Instructions.h.
References llvm::Acquire, llvm::AcquireRelease, llvm_unreachable, llvm::Monotonic, llvm::Release, and llvm::SequentiallyConsistent.
AtomicOrdering llvm::AtomicCmpXchgInst::getSuccessOrdering | ( | ) | const [inline] |
Returns the ordering constraint on this cmpxchg.
Definition at line 554 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl(), and llvm::AliasAnalysis::getModRefInfo().
SynchronizationScope llvm::AtomicCmpXchgInst::getSynchScope | ( | ) | const [inline] |
Returns whether this cmpxchg is atomic between threads or only within a single thread.
Definition at line 565 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl().
bool llvm::AtomicCmpXchgInst::isVolatile | ( | ) | const [inline] |
isVolatile - Return true if this is a cmpxchg from a volatile memory location.
Definition at line 506 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl().
bool llvm::AtomicCmpXchgInst::isWeak | ( | ) | const [inline] |
Return true if this cmpxchg may spuriously fail.
Definition at line 518 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl().
void* llvm::AtomicCmpXchgInst::operator new | ( | size_t | s | ) | [inline] |
Reimplemented from llvm::User.
Definition at line 489 of file Instructions.h.
void llvm::AtomicCmpXchgInst::setFailureOrdering | ( | AtomicOrdering | Ordering | ) | [inline] |
Definition at line 538 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction(), and llvm::NotAtomic.
void llvm::AtomicCmpXchgInst::setSuccessOrdering | ( | AtomicOrdering | Ordering | ) | [inline] |
Set the ordering constraint on this cmpxchg.
Definition at line 531 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction(), and llvm::NotAtomic.
void llvm::AtomicCmpXchgInst::setSynchScope | ( | SynchronizationScope | SynchScope | ) | [inline] |
Specify whether this cmpxchg is atomic and orders other operations with respect to all concurrently executing threads, or only with respect to signal handlers executing in the same thread.
Definition at line 548 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
void llvm::AtomicCmpXchgInst::setVolatile | ( | bool | V | ) | [inline] |
setVolatile - Specify whether this is a volatile cmpxchg.
Definition at line 512 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl().
void llvm::AtomicCmpXchgInst::setWeak | ( | bool | IsWeak | ) | [inline] |
Definition at line 522 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl().