LLVM 20.0.0git
Public Member Functions | Protected Attributes | List of all members
llvm::AtomicInfo Class Referenceabstract

#include "llvm/Frontend/Atomic/Atomic.h"

Inheritance diagram for llvm::AtomicInfo:
Inheritance graph
[legend]

Public Member Functions

 AtomicInfo (IRBuilderBase *Builder, Type *Ty, uint64_t AtomicSizeInBits, uint64_t ValueSizeInBits, Align AtomicAlign, Align ValueAlign, bool UseLibcall)
 
virtual ~AtomicInfo ()=default
 
Align getAtomicAlignment () const
 
uint64_t getAtomicSizeInBits () const
 
uint64_t getValueSizeInBits () const
 
bool shouldUseLibcall () const
 
TypegetAtomicTy () const
 
virtual ValuegetAtomicPointer () const =0
 
virtual void decorateWithTBAA (Instruction *I)=0
 
virtual AllocaInstCreateAlloca (Type *Ty, const Twine &Name) const =0
 
bool hasPadding () const
 
LLVMContextgetLLVMContext () const
 
bool shouldCastToInt (Type *ValTy, bool CmpXchg)
 
ValueEmitAtomicLoadOp (AtomicOrdering AO, bool IsVolatile, bool CmpXchg=false)
 
CallInstEmitAtomicLibcall (StringRef fnName, Type *ResultType, ArrayRef< Value * > Args)
 
ValuegetAtomicSizeValue () const
 
std::pair< Value *, Value * > EmitAtomicCompareExchangeLibcall (Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure)
 
ValuecastToAtomicIntPointer (Value *addr) const
 
ValuegetAtomicAddressAsAtomicIntPointer () const
 
std::pair< Value *, Value * > EmitAtomicCompareExchangeOp (Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure, bool IsVolatile=false, bool IsWeak=false)
 
std::pair< Value *, Value * > EmitAtomicCompareExchange (Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure, bool IsVolatile, bool IsWeak)
 
std::pair< LoadInst *, AllocaInst * > EmitAtomicLoadLibcall (AtomicOrdering AO)
 

Protected Attributes

IRBuilderBaseBuilder
 
TypeTy
 
uint64_t AtomicSizeInBits
 
uint64_t ValueSizeInBits
 
Align AtomicAlign
 
Align ValueAlign
 
bool UseLibcall
 

Detailed Description

Definition at line 16 of file Atomic.h.

Constructor & Destructor Documentation

◆ AtomicInfo()

llvm::AtomicInfo::AtomicInfo ( IRBuilderBase Builder,
Type Ty,
uint64_t  AtomicSizeInBits,
uint64_t  ValueSizeInBits,
Align  AtomicAlign,
Align  ValueAlign,
bool  UseLibcall 
)
inline

Definition at line 27 of file Atomic.h.

◆ ~AtomicInfo()

virtual llvm::AtomicInfo::~AtomicInfo ( )
virtualdefault

Member Function Documentation

◆ castToAtomicIntPointer()

Value * llvm::AtomicInfo::castToAtomicIntPointer ( Value addr) const
inline

Definition at line 80 of file Atomic.h.

Referenced by getAtomicAddressAsAtomicIntPointer().

◆ CreateAlloca()

virtual AllocaInst * llvm::AtomicInfo::CreateAlloca ( Type Ty,
const Twine Name 
) const
pure virtual

◆ decorateWithTBAA()

virtual void llvm::AtomicInfo::decorateWithTBAA ( Instruction I)
pure virtual

Implemented in llvm::OpenMPIRBuilder::AtomicInfo.

Referenced by EmitAtomicLoadOp().

◆ EmitAtomicCompareExchange()

std::pair< Value *, Value * > AtomicInfo::EmitAtomicCompareExchange ( Value ExpectedVal,
Value DesiredVal,
AtomicOrdering  Success,
AtomicOrdering  Failure,
bool  IsVolatile,
bool  IsWeak 
)

◆ EmitAtomicCompareExchangeLibcall()

std::pair< Value *, Value * > AtomicInfo::EmitAtomicCompareExchangeLibcall ( Value ExpectedVal,
Value DesiredVal,
AtomicOrdering  Success,
AtomicOrdering  Failure 
)

◆ EmitAtomicCompareExchangeOp()

std::pair< Value *, Value * > AtomicInfo::EmitAtomicCompareExchangeOp ( Value ExpectedVal,
Value DesiredVal,
AtomicOrdering  Success,
AtomicOrdering  Failure,
bool  IsVolatile = false,
bool  IsWeak = false 
)

◆ EmitAtomicLibcall()

CallInst * AtomicInfo::EmitAtomicLibcall ( StringRef  fnName,
Type ResultType,
ArrayRef< Value * >  Args 
)

◆ EmitAtomicLoadLibcall()

std::pair< LoadInst *, AllocaInst * > AtomicInfo::EmitAtomicLoadLibcall ( AtomicOrdering  AO)

◆ EmitAtomicLoadOp()

Value * AtomicInfo::EmitAtomicLoadOp ( AtomicOrdering  AO,
bool  IsVolatile,
bool  CmpXchg = false 
)

◆ getAtomicAddressAsAtomicIntPointer()

Value * llvm::AtomicInfo::getAtomicAddressAsAtomicIntPointer ( ) const
inline

Definition at line 84 of file Atomic.h.

References castToAtomicIntPointer(), and getAtomicPointer().

Referenced by EmitAtomicCompareExchangeOp().

◆ getAtomicAlignment()

Align llvm::AtomicInfo::getAtomicAlignment ( ) const
inline

Definition at line 36 of file Atomic.h.

References AtomicAlign.

Referenced by EmitAtomicCompareExchangeOp().

◆ getAtomicPointer()

virtual Value * llvm::AtomicInfo::getAtomicPointer ( ) const
pure virtual

◆ getAtomicSizeInBits()

uint64_t llvm::AtomicInfo::getAtomicSizeInBits ( ) const
inline

Definition at line 37 of file Atomic.h.

References AtomicSizeInBits.

Referenced by EmitAtomicLoadLibcall().

◆ getAtomicSizeValue()

Value * llvm::AtomicInfo::getAtomicSizeValue ( ) const
inline

Definition at line 65 of file Atomic.h.

References AtomicSizeInBits, llvm::IntegerType::get(), and getLLVMContext().

Referenced by EmitAtomicCompareExchangeLibcall().

◆ getAtomicTy()

Type * llvm::AtomicInfo::getAtomicTy ( ) const
inline

Definition at line 40 of file Atomic.h.

References Ty.

◆ getLLVMContext()

LLVMContext & llvm::AtomicInfo::getLLVMContext ( ) const
inline

◆ getValueSizeInBits()

uint64_t llvm::AtomicInfo::getValueSizeInBits ( ) const
inline

Definition at line 38 of file Atomic.h.

References ValueSizeInBits.

◆ hasPadding()

bool llvm::AtomicInfo::hasPadding ( ) const
inline

Definition at line 53 of file Atomic.h.

References AtomicSizeInBits, and ValueSizeInBits.

◆ shouldCastToInt()

bool AtomicInfo::shouldCastToInt ( Type ValTy,
bool  CmpXchg 
)

◆ shouldUseLibcall()

bool llvm::AtomicInfo::shouldUseLibcall ( ) const
inline

Definition at line 39 of file Atomic.h.

References UseLibcall.

Referenced by EmitAtomicCompareExchange().

Member Data Documentation

◆ AtomicAlign

Align llvm::AtomicInfo::AtomicAlign
protected

Definition at line 22 of file Atomic.h.

Referenced by EmitAtomicLoadOp(), and getAtomicAlignment().

◆ AtomicSizeInBits

uint64_t llvm::AtomicInfo::AtomicSizeInBits
protected

Definition at line 20 of file Atomic.h.

Referenced by EmitAtomicLoadOp(), getAtomicSizeInBits(), getAtomicSizeValue(), and hasPadding().

◆ Builder

IRBuilderBase* llvm::AtomicInfo::Builder
protected

◆ Ty

Type* llvm::AtomicInfo::Ty
protected

◆ UseLibcall

bool llvm::AtomicInfo::UseLibcall
protected

Definition at line 24 of file Atomic.h.

Referenced by shouldUseLibcall().

◆ ValueAlign

Align llvm::AtomicInfo::ValueAlign
protected

Definition at line 23 of file Atomic.h.

◆ ValueSizeInBits

uint64_t llvm::AtomicInfo::ValueSizeInBits
protected

Definition at line 21 of file Atomic.h.

Referenced by getValueSizeInBits(), and hasPadding().


The documentation for this class was generated from the following files: