class AtomicRMWInst

Declaration

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

Description

an instruction that atomically reads a memory location, combines it with another value, and then stores the result back. Returns the old value.

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

Inherits from: Instruction

Member Variables

private SyncScope::ID SSID
The synchronization scope ID of this rmw instruction. Not quite enough room in SubClassData for everything, so synchronization scope ID gets its own field.

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

  • public AtomicRMWInst(llvm::AtomicRMWInst::BinOp Operation, llvm::Value * Ptr, llvm::Value * Val, llvm::Align Alignment, llvm::AtomicOrdering Ordering, SyncScope::ID SSID, llvm::Instruction * InsertBefore = nullptr)
  • public AtomicRMWInst(llvm::AtomicRMWInst::BinOp Operation, llvm::Value * Ptr, llvm::Value * Val, llvm::Align Alignment, llvm::AtomicOrdering Ordering, SyncScope::ID SSID, llvm::BasicBlock * InsertAtEnd)
  • private void Init(llvm::AtomicRMWInst::BinOp Operation, llvm::Value * Ptr, llvm::Value * Val, llvm::Align Align, llvm::AtomicOrdering Ordering, SyncScope::ID SSID)
  • public static bool classof(const llvm::Value * V)
  • public static bool classof(const llvm::Instruction * I)
  • protected llvm::AtomicRMWInst * cloneImpl() const
  • public llvm::Align getAlign() const
  • public llvm::AtomicRMWInst::BinOp getOperation() const
  • public static llvm::StringRef getOperationName(llvm::AtomicRMWInst::BinOp Op)
  • public llvm::AtomicOrdering getOrdering() const
  • public unsigned int getPointerAddressSpace() const
  • public const llvm::Value * getPointerOperand() const
  • public llvm::Value * getPointerOperand()
  • public static unsigned int getPointerOperandIndex()
  • public SyncScope::ID getSyncScopeID() const
  • public llvm::Value * getValOperand()
  • public const llvm::Value * getValOperand() const
  • public static bool isFPOperation(llvm::AtomicRMWInst::BinOp Op)
  • public bool isFloatingPointOperation() const
  • public bool isVolatile() const
  • public void setAlignment(llvm::Align Align)
  • public void setOperation(llvm::AtomicRMWInst::BinOp Operation)
  • public void setOrdering(llvm::AtomicOrdering Ordering)
  • private template <typename Bitfield>void setSubclassData(typename Bitfield::Type Value)
  • public void setSyncScopeID(SyncScope::ID SSID)
  • public void setVolatile(bool V)

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

AtomicRMWInst(
    llvm::AtomicRMWInst::BinOp Operation,
    llvm::Value* Ptr,
    llvm::Value* Val,
    llvm::Align Alignment,
    llvm::AtomicOrdering Ordering,
    SyncScope::ID SSID,
    llvm::Instruction* InsertBefore = nullptr)

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

Parameters

llvm::AtomicRMWInst::BinOp Operation
llvm::Value* Ptr
llvm::Value* Val
llvm::Align Alignment
llvm::AtomicOrdering Ordering
SyncScope::ID SSID
llvm::Instruction* InsertBefore = nullptr

AtomicRMWInst(
    llvm::AtomicRMWInst::BinOp Operation,
    llvm::Value* Ptr,
    llvm::Value* Val,
    llvm::Align Alignment,
    llvm::AtomicOrdering Ordering,
    SyncScope::ID SSID,
    llvm::BasicBlock* InsertAtEnd)

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

Parameters

llvm::AtomicRMWInst::BinOp Operation
llvm::Value* Ptr
llvm::Value* Val
llvm::Align Alignment
llvm::AtomicOrdering Ordering
SyncScope::ID SSID
llvm::BasicBlock* InsertAtEnd

void Init(llvm::AtomicRMWInst::BinOp Operation,
          llvm::Value* Ptr,
          llvm::Value* Val,
          llvm::Align Align,
          llvm::AtomicOrdering Ordering,
          SyncScope::ID SSID)

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

Parameters

llvm::AtomicRMWInst::BinOp Operation
llvm::Value* Ptr
llvm::Value* Val
llvm::Align Align
llvm::AtomicOrdering Ordering
SyncScope::ID SSID

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

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

Parameters

const llvm::Value* V

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

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

Parameters

const llvm::Instruction* I

llvm::AtomicRMWInst* cloneImpl() const

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

llvm::Align getAlign() const

Description

Return the alignment of the memory that is being allocated by the instruction.

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

llvm::AtomicRMWInst::BinOp getOperation() const

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

static llvm::StringRef getOperationName(
    llvm::AtomicRMWInst::BinOp Op)

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

Parameters

llvm::AtomicRMWInst::BinOp Op

llvm::AtomicOrdering getOrdering() const

Description

Returns the ordering constraint of this rmw instruction.

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

unsigned int getPointerAddressSpace() const

Description

Returns the address space of the pointer operand.

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

const llvm::Value* getPointerOperand() const

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

llvm::Value* getPointerOperand()

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

static unsigned int getPointerOperandIndex()

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

SyncScope::ID getSyncScopeID() const

Description

Returns the synchronization scope ID of this rmw instruction.

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

llvm::Value* getValOperand()

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

const llvm::Value* getValOperand() const

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

static bool isFPOperation(
    llvm::AtomicRMWInst::BinOp Op)

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

Parameters

llvm::AtomicRMWInst::BinOp Op

bool isFloatingPointOperation() const

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

bool isVolatile() const

Description

Return true if this is a RMW on a volatile memory location.

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

void setAlignment(llvm::Align Align)

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

Parameters

llvm::Align Align

void setOperation(
    llvm::AtomicRMWInst::BinOp Operation)

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

Parameters

llvm::AtomicRMWInst::BinOp Operation

void setOrdering(llvm::AtomicOrdering Ordering)

Description

Sets the ordering constraint of this rmw instruction.

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

Parameters

llvm::AtomicOrdering Ordering

template <typename Bitfield>
void setSubclassData(
    typename Bitfield::Type Value)

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

Templates

Bitfield

Parameters

typename Bitfield::Type Value

void setSyncScopeID(SyncScope::ID SSID)

Description

Sets the synchronization scope ID of this rmw instruction.

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

Parameters

SyncScope::ID SSID

void setVolatile(bool V)

Description

Specify whether this is a volatile RMW or not.

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

Parameters

bool V