9#ifndef LLVM_FRONTEND_ATOMIC_ATOMIC_H
10#define LLVM_FRONTEND_ATOMIC_ATOMIC_H
62 bool CmpXchg =
false);
93 bool IsVolatile =
false,
bool IsWeak =
false);
98 bool IsVolatile,
bool IsWeak);
100 LLVM_ABI std::pair<LoadInst *, AllocaInst *>
Module.h This file contains the declarations for the Module class.
an instruction to allocate memory on the stack
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
uint64_t getValueSizeInBits() const
virtual ~AtomicInfo()=default
AtomicInfo(IRBuilderBase *Builder, Type *Ty, uint64_t AtomicSizeInBits, uint64_t ValueSizeInBits, Align AtomicAlign, Align ValueAlign, bool UseLibcall, IRBuilderBase::InsertPoint AllocaIP)
LLVM_ABI std::pair< Value *, Value * > EmitAtomicCompareExchange(Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure, bool IsVolatile, bool IsWeak)
virtual AllocaInst * CreateAlloca(Type *Ty, const Twine &Name) const =0
LLVM_ABI std::pair< LoadInst *, AllocaInst * > EmitAtomicLoadLibcall(AtomicOrdering AO)
LLVM_ABI std::pair< Value *, Value * > EmitAtomicCompareExchangeOp(Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure, bool IsVolatile=false, bool IsWeak=false)
Type * getAtomicTy() const
uint64_t getAtomicSizeInBits() const
LLVM_ABI Value * EmitAtomicLoadOp(AtomicOrdering AO, bool IsVolatile, bool CmpXchg=false)
virtual Value * getAtomicPointer() const =0
Value * castToAtomicIntPointer(Value *addr) const
LLVM_ABI std::pair< Value *, Value * > EmitAtomicCompareExchangeLibcall(Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure)
LLVM_ABI bool shouldCastToInt(Type *ValTy, bool CmpXchg)
uint64_t AtomicSizeInBits
LLVM_ABI void EmitAtomicStoreLibcall(AtomicOrdering AO, Value *Source)
IRBuilderBase::InsertPoint AllocaIP
LLVMContext & getLLVMContext() const
Value * getAtomicAddressAsAtomicIntPointer() const
virtual void decorateWithTBAA(Instruction *I)=0
LLVM_ABI CallInst * EmitAtomicLibcall(StringRef fnName, Type *ResultType, ArrayRef< Value * > Args)
Value * getAtomicSizeValue() const
bool shouldUseLibcall() const
Align getAtomicAlignment() const
This class represents a function call, abstracting a target machine's calling convention.
InsertPoint - A saved insertion point.
Common base class shared among various IRBuilders.
LLVMContext & getContext() const
static LLVM_ABI IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
This is an important class for using LLVM in a threaded context.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
@ Success
The lock was released successfully.
AtomicOrdering
Atomic ordering for LLVM's memory model.
This struct is a compact representation of a valid (non-zero power of two) alignment.