LLVM API Documentation
#include <Instructions.h>
Public Types | |
enum | BinOp { Xchg, Add, Sub, And, Nand, Or, Xor, Max, Min, UMax, UMin, FIRST_BINOP = Xchg, LAST_BINOP = UMin, BAD_BINOP } |
Public Member Functions | |
void * | operator new (size_t s) |
AtomicRMWInst (BinOp Operation, Value *Ptr, Value *Val, AtomicOrdering Ordering, SynchronizationScope SynchScope, Instruction *InsertBefore=nullptr) | |
AtomicRMWInst (BinOp Operation, Value *Ptr, Value *Val, AtomicOrdering Ordering, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd) | |
BinOp | getOperation () const |
void | setOperation (BinOp Operation) |
bool | isVolatile () const |
void | setVolatile (bool V) |
DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
Transparently provide more efficient getOperand methods. | |
void | setOrdering (AtomicOrdering Ordering) |
Set the ordering constraint on this RMW. | |
void | setSynchScope (SynchronizationScope SynchScope) |
AtomicOrdering | getOrdering () const |
Returns the ordering constraint on this RMW. | |
SynchronizationScope | getSynchScope () const |
Value * | getPointerOperand () |
const Value * | getPointerOperand () const |
Value * | getValOperand () |
const Value * | getValOperand () const |
unsigned | getPointerAddressSpace () const |
Returns the address space of the pointer operand. | |
Static Public Member Functions | |
static unsigned | getPointerOperandIndex () |
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 | |
AtomicRMWInst * | clone_impl () const override |
AtomicRMWInst - an instruction that atomically reads a memory location, combines it with another value, and then stores the result back. Returns the old value.
Definition at line 636 of file Instructions.h.
This enumeration lists the possible modifications atomicrmw can make. In the descriptions, 'p' is the pointer to the instruction's memory location, 'old' is the initial value of *p, and 'v' is the other value passed to the instruction. These instructions always return 'old'.
Definition at line 645 of file Instructions.h.
AtomicRMWInst::AtomicRMWInst | ( | BinOp | Operation, |
Value * | Ptr, | ||
Value * | Val, | ||
AtomicOrdering | Ordering, | ||
SynchronizationScope | SynchScope, | ||
Instruction * | InsertBefore = nullptr |
||
) |
Definition at line 1300 of file Instructions.cpp.
Referenced by clone_impl().
AtomicRMWInst::AtomicRMWInst | ( | BinOp | Operation, |
Value * | Ptr, | ||
Value * | Val, | ||
AtomicOrdering | Ordering, | ||
SynchronizationScope | SynchScope, | ||
BasicBlock * | InsertAtEnd | ||
) |
Definition at line 1311 of file Instructions.cpp.
static bool llvm::AtomicRMWInst::classof | ( | const Instruction * | I | ) | [inline, static] |
Definition at line 751 of file Instructions.h.
References llvm::Instruction::getOpcode().
static bool llvm::AtomicRMWInst::classof | ( | const Value * | V | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::Instruction.
Definition at line 754 of file Instructions.h.
AtomicRMWInst * AtomicRMWInst::clone_impl | ( | ) | const [override, protected, virtual] |
Implements llvm::Instruction.
Definition at line 3665 of file Instructions.cpp.
References AtomicRMWInst(), llvm::User::getOperand(), getOperation(), getOrdering(), getSynchScope(), isVolatile(), and setVolatile().
Transparently provide more efficient getOperand methods.
BinOp llvm::AtomicRMWInst::getOperation | ( | ) | const [inline] |
Definition at line 685 of file Instructions.h.
Referenced by clone_impl(), and LowerAtomicRMWInst().
AtomicOrdering llvm::AtomicRMWInst::getOrdering | ( | ) | const [inline] |
Returns the ordering constraint on this RMW.
Definition at line 728 of file Instructions.h.
Referenced by clone_impl(), and llvm::AliasAnalysis::getModRefInfo().
unsigned llvm::AtomicRMWInst::getPointerAddressSpace | ( | ) | const [inline] |
Returns the address space of the pointer operand.
Definition at line 746 of file Instructions.h.
References llvm::Type::getPointerAddressSpace(), getPointerOperand(), and llvm::Value::getType().
Value* llvm::AtomicRMWInst::getPointerOperand | ( | ) | [inline] |
Definition at line 738 of file Instructions.h.
Referenced by llvm::AliasAnalysis::getLocation(), and LowerAtomicRMWInst().
const Value* llvm::AtomicRMWInst::getPointerOperand | ( | ) | const [inline] |
Definition at line 739 of file Instructions.h.
static unsigned llvm::AtomicRMWInst::getPointerOperandIndex | ( | ) | [inline, static] |
Definition at line 740 of file Instructions.h.
SynchronizationScope llvm::AtomicRMWInst::getSynchScope | ( | ) | const [inline] |
Returns whether this RMW is atomic between threads or only within a single thread.
Definition at line 734 of file Instructions.h.
Referenced by clone_impl().
Value* llvm::AtomicRMWInst::getValOperand | ( | ) | [inline] |
Definition at line 742 of file Instructions.h.
Referenced by llvm::AliasAnalysis::getLocation(), and LowerAtomicRMWInst().
const Value* llvm::AtomicRMWInst::getValOperand | ( | ) | const [inline] |
Definition at line 743 of file Instructions.h.
bool llvm::AtomicRMWInst::isVolatile | ( | ) | const [inline] |
isVolatile - Return true if this is a RMW on a volatile memory location.
Definition at line 697 of file Instructions.h.
Referenced by clone_impl().
void* llvm::AtomicRMWInst::operator new | ( | size_t | s | ) | [inline] |
Reimplemented from llvm::User.
Definition at line 675 of file Instructions.h.
void llvm::AtomicRMWInst::setOperation | ( | BinOp | Operation | ) | [inline] |
Definition at line 689 of file Instructions.h.
void llvm::AtomicRMWInst::setOrdering | ( | AtomicOrdering | Ordering | ) | [inline] |
Set the ordering constraint on this RMW.
Definition at line 712 of file Instructions.h.
References llvm::NotAtomic.
void llvm::AtomicRMWInst::setSynchScope | ( | SynchronizationScope | SynchScope | ) | [inline] |
Specify whether this RMW 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 722 of file Instructions.h.
void llvm::AtomicRMWInst::setVolatile | ( | bool | V | ) | [inline] |
setVolatile - Specify whether this is a volatile RMW or not.
Definition at line 703 of file Instructions.h.
Referenced by clone_impl().