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)
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
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 480 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 1247 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 1260 of file Instructions.cpp.


Member Function Documentation

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]

Transparently provide more efficient getOperand methods.

Definition at line 573 of file Instructions.h.

References llvm::User::getOperand().

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

Definition at line 574 of file Instructions.h.

References llvm::User::getOperand().

Returns the ordering constraint on this cmpxchg.

Definition at line 559 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by clone_impl().

Definition at line 576 of file Instructions.h.

References llvm::User::getOperand().

Referenced by LowerAtomicCmpXchgInst().

Definition at line 577 of file Instructions.h.

References llvm::User::getOperand().

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().

Definition at line 570 of file Instructions.h.

References llvm::User::getOperand().

Definition at line 571 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 592 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 554 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 565 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 506 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by clone_impl().

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.

Set the ordering constraint on this cmpxchg.

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

References llvm::Instruction::getSubclassDataFromInstruction().

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().


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