LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::AtomicCmpXchgInst Class Reference

#include <Instructions.h>

Inheritance diagram for llvm::AtomicCmpXchgInst:
Inheritance graph
[legend]
Collaboration diagram for llvm::AtomicCmpXchgInst:
Collaboration graph
[legend]

List of all members.

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)
 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
ValuegetPointerOperand ()
const ValuegetPointerOperand () const
ValuegetCompareOperand ()
const ValuegetCompareOperand () const
ValuegetNewValOperand ()
const ValuegetNewValOperand () 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

AtomicCmpXchgInstclone_impl () const override

Detailed Description

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 466 of file Instructions.h.


Constructor & Destructor Documentation

AtomicCmpXchgInst::AtomicCmpXchgInst ( Value Ptr,
Value Cmp,
Value NewVal,
AtomicOrdering  SuccessOrdering,
AtomicOrdering  FailureOrdering,
SynchronizationScope  SynchScope,
Instruction InsertBefore = nullptr 
)

Definition at line 1249 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 1261 of file Instructions.cpp.


Member Function Documentation

static bool llvm::AtomicCmpXchgInst::classof ( const Instruction I) [inline, static]

Definition at line 583 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 586 of file Instructions.h.

References classof().

AtomicCmpXchgInst * AtomicCmpXchgInst::clone_impl ( ) const [override, protected, virtual]

Transparently provide more efficient getOperand methods.

Definition at line 549 of file Instructions.h.

References llvm::User::getOperand().

Referenced by llvm::AliasAnalysis::getLocation(), and LowerAtomicCmpXchgInst().

Definition at line 550 of file Instructions.h.

References llvm::User::getOperand().

Returns the ordering constraint on this cmpxchg.

Definition at line 535 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by clone_impl().

Definition at line 552 of file Instructions.h.

References llvm::User::getOperand().

Referenced by LowerAtomicCmpXchgInst().

Definition at line 553 of file Instructions.h.

References llvm::User::getOperand().

Returns the address space of the pointer operand.

Definition at line 556 of file Instructions.h.

References llvm::Type::getPointerAddressSpace(), getPointerOperand(), and llvm::Value::getType().

Definition at line 546 of file Instructions.h.

References llvm::User::getOperand().

Definition at line 547 of file Instructions.h.

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 568 of file Instructions.h.

References llvm::Acquire, llvm::AcquireRelease, llvm_unreachable, llvm::Monotonic, llvm::Release, and llvm::SequentiallyConsistent.

Returns the ordering constraint on this cmpxchg.

Definition at line 530 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by clone_impl(), and llvm::AliasAnalysis::getModRefInfo().

Returns whether this cmpxchg is atomic between threads or only within a single thread.

Definition at line 541 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by clone_impl().

isVolatile - Return true if this is a cmpxchg from a volatile memory location.

Definition at line 492 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 475 of file Instructions.h.

Set the ordering constraint on this cmpxchg.

Definition at line 507 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction(), and llvm::NotAtomic.

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 524 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

setVolatile - Specify whether this is a volatile cmpxchg.

Definition at line 498 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by clone_impl().


The documentation for this class was generated from the following files: