class AtomicCmpXchgInst

Declaration

class AtomicCmpXchgInst : public Instruction { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/Instructions.h:547

Inherits from: Instruction

Member Variables

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 29
public static MaximumAlignment = 1U << MaxAlignmentExponent

Method Overview

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

AtomicCmpXchgInst(
    llvm::Value* Ptr,
    llvm::Value* Cmp,
    llvm::Value* NewVal,
    llvm::AtomicOrdering SuccessOrdering,
    llvm::AtomicOrdering FailureOrdering,
    SyncScope::ID SSID,
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:559

Parameters

llvm::Value* Ptr
llvm::Value* Cmp
llvm::Value* NewVal
llvm::AtomicOrdering SuccessOrdering
llvm::AtomicOrdering FailureOrdering
SyncScope::ID SSID
llvm::Instruction* InsertBefore = nullptr

AtomicCmpXchgInst(
    llvm::Value* Ptr,
    llvm::Value* Cmp,
    llvm::Value* NewVal,
    llvm::AtomicOrdering SuccessOrdering,
    llvm::AtomicOrdering FailureOrdering,
    SyncScope::ID SSID,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:563

Parameters

llvm::Value* Ptr
llvm::Value* Cmp
llvm::Value* NewVal
llvm::AtomicOrdering SuccessOrdering
llvm::AtomicOrdering FailureOrdering
SyncScope::ID SSID
llvm::BasicBlock* InsertAtEnd

static bool classof(const llvm::Value* V)

Declared at: llvm/include/llvm/IR/Instructions.h:678

Parameters

const llvm::Value* V

static bool classof(const llvm::Instruction* I)

Declared at: llvm/include/llvm/IR/Instructions.h:675

Parameters

const llvm::Instruction* I

llvm::AtomicCmpXchgInst* cloneImpl() const

Declared at: llvm/include/llvm/IR/Instructions.h:556

const llvm::Value* getCompareOperand() const

Declared at: llvm/include/llvm/IR/Instructions.h:641

llvm::Value* getCompareOperand()

Declared at: llvm/include/llvm/IR/Instructions.h:640

llvm::AtomicOrdering getFailureOrdering() const

Description

Returns the failure ordering constraint of this cmpxchg instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:614

const llvm::Value* getNewValOperand() const

Declared at: llvm/include/llvm/IR/Instructions.h:644

llvm::Value* getNewValOperand()

Declared at: llvm/include/llvm/IR/Instructions.h:643

unsigned int getPointerAddressSpace() const

Description

Returns the address space of the pointer operand.

Declared at: llvm/include/llvm/IR/Instructions.h:647

const llvm::Value* getPointerOperand() const

Declared at: llvm/include/llvm/IR/Instructions.h:637

llvm::Value* getPointerOperand()

Declared at: llvm/include/llvm/IR/Instructions.h:636

static unsigned int getPointerOperandIndex()

Declared at: llvm/include/llvm/IR/Instructions.h:638

static llvm::AtomicOrdering
getStrongestFailureOrdering(
    llvm::AtomicOrdering SuccessOrdering)

Description

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.

Declared at: llvm/include/llvm/IR/Instructions.h:659

Parameters

llvm::AtomicOrdering SuccessOrdering

llvm::AtomicOrdering getSuccessOrdering() const

Description

Returns the success ordering constraint of this cmpxchg instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:601

SyncScope::ID getSyncScopeID() const

Description

Returns the synchronization scope ID of this cmpxchg instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:627

bool isVolatile() const

Description

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

Declared at: llvm/include/llvm/IR/Instructions.h:576

bool isWeak() const

Description

Return true if this cmpxchg may spuriously fail.

Declared at: llvm/include/llvm/IR/Instructions.h:588

void setFailureOrdering(
    llvm::AtomicOrdering Ordering)

Description

Sets the failure ordering constraint of this cmpxchg instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:619

Parameters

llvm::AtomicOrdering Ordering

void setSuccessOrdering(
    llvm::AtomicOrdering Ordering)

Description

Sets the success ordering constraint of this cmpxchg instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:606

Parameters

llvm::AtomicOrdering Ordering

void setSyncScopeID(SyncScope::ID SSID)

Description

Sets the synchronization scope ID of this cmpxchg instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:632

Parameters

SyncScope::ID SSID

void setVolatile(bool V)

Description

Specify whether this is a volatile cmpxchg.

Declared at: llvm/include/llvm/IR/Instructions.h:582

Parameters

bool V

void setWeak(bool IsWeak)

Declared at: llvm/include/llvm/IR/Instructions.h:592

Parameters

bool IsWeak