9#ifndef LLVM_FRONTEND_ATOMIC_ATOMIC_H
10#define LLVM_FRONTEND_ATOMIC_ATOMIC_H
60 bool CmpXchg =
false);
75 std::pair<Value *, Value *>
88 std::pair<Value *, Value *>
91 bool IsVolatile =
false,
bool IsWeak =
false);
93 std::pair<Value *, Value *>
96 bool IsVolatile,
bool IsWeak);
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
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
std::pair< LoadInst *, AllocaInst * > EmitAtomicLoadLibcall(AtomicOrdering AO)
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
Value * EmitAtomicLoadOp(AtomicOrdering AO, bool IsVolatile, bool CmpXchg=false)
virtual Value * getAtomicPointer() const =0
Value * castToAtomicIntPointer(Value *addr) const
std::pair< Value *, Value * > EmitAtomicCompareExchangeLibcall(Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure)
bool shouldCastToInt(Type *ValTy, bool CmpXchg)
AtomicInfo(IRBuilderBase *Builder, Type *Ty, uint64_t AtomicSizeInBits, uint64_t ValueSizeInBits, Align AtomicAlign, Align ValueAlign, bool UseLibcall)
uint64_t AtomicSizeInBits
LLVMContext & getLLVMContext() const
Value * getAtomicAddressAsAtomicIntPointer() const
virtual void decorateWithTBAA(Instruction *I)=0
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.
Common base class shared among various IRBuilders.
LLVMContext & getContext() const
static 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.
AtomicOrdering
Atomic ordering for LLVM's memory model.
This struct is a compact representation of a valid (non-zero power of two) alignment.