LLVM 23.0.0git
VNCoercion.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "vncoerce"

Functions

static bool isFirstClassAggregateOrScalableType (Type *Ty)
static int analyzeLoadFromClobberingWrite (Type *LoadTy, Value *LoadPtr, Value *WritePtr, uint64_t WriteSizeInBits, const DataLayout &DL)
 This function is called when we have a memdep query of a load that ends up being a clobbering memory write (store, memset, memcpy, memmove).
static ValuegetStoreValueForLoadHelper (Value *SrcVal, unsigned Offset, Type *LoadTy, IRBuilderBase &Builder, const DataLayout &DL)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "vncoerce"

Definition at line 7 of file VNCoercion.cpp.

Function Documentation

◆ analyzeLoadFromClobberingWrite()

int analyzeLoadFromClobberingWrite ( Type * LoadTy,
Value * LoadPtr,
Value * WritePtr,
uint64_t WriteSizeInBits,
const DataLayout & DL )
static

This function is called when we have a memdep query of a load that ends up being a clobbering memory write (store, memset, memcpy, memmove).

This means that the write may provide bits used by the load but we can't be sure because the pointers don't must-alias.

Check this case to see if there is anything more we can do before we give up. This returns -1 if we have to give up, or a byte number in the stored value of the piece that feeds the load.

Definition at line 198 of file VNCoercion.cpp.

References DL, llvm::GetPointerBaseWithConstantOffset(), and isFirstClassAggregateOrScalableType().

Referenced by llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), and llvm::VNCoercion::analyzeLoadFromClobberingStore().

◆ getStoreValueForLoadHelper()

◆ isFirstClassAggregateOrScalableType()