LLVM  8.0.1
Namespaces | Macros | Functions
VNCoercion.cpp File Reference
#include "llvm/Transforms/Utils/VNCoercion.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/Debug.h"
Include dependency graph for VNCoercion.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 
 llvm::VNCoercion
 

Macros

#define DEBUG_TYPE   "vncoerce"
 

Functions

bool llvm::VNCoercion::canCoerceMustAliasedValueToLoad (Value *StoredVal, Type *LoadTy, const DataLayout &DL)
 Return true if CoerceAvailableValueToLoadType would succeed if it was called. More...
 
template<class T , class HelperClass >
static Tllvm::VNCoercion::coerceAvailableValueToLoadTypeHelper (T *StoredVal, Type *LoadedTy, HelperClass &Helper, const DataLayout &DL)
 
Value * llvm::VNCoercion::coerceAvailableValueToLoadType (Value *StoredVal, Type *LoadedTy, IRBuilder<> &IRB, const DataLayout &DL)
 If we saw a store of a value to memory, and then a load from a must-aliased pointer of a different type, try to coerce the stored value to the loaded type. More...
 
static int llvm::VNCoercion::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). More...
 
int llvm::VNCoercion::analyzeLoadFromClobberingStore (Type *LoadTy, Value *LoadPtr, StoreInst *DepSI, const DataLayout &DL)
 This function determines whether a value for the pointer LoadPtr can be extracted from the store at DepSI. More...
 
int llvm::VNCoercion::analyzeLoadFromClobberingLoad (Type *LoadTy, Value *LoadPtr, LoadInst *DepLI, const DataLayout &DL)
 This function determines whether a value for the pointer LoadPtr can be extracted from the load at DepLI. More...
 
int llvm::VNCoercion::analyzeLoadFromClobberingMemInst (Type *LoadTy, Value *LoadPtr, MemIntrinsic *DepMI, const DataLayout &DL)
 This function determines whether a value for the pointer LoadPtr can be extracted from the memory intrinsic at DepMI. More...
 
template<class T , class HelperClass >
static Tllvm::VNCoercion::getStoreValueForLoadHelper (T *SrcVal, unsigned Offset, Type *LoadTy, HelperClass &Helper, const DataLayout &DL)
 
Value * llvm::VNCoercion::getStoreValueForLoad (Value *SrcVal, unsigned Offset, Type *LoadTy, Instruction *InsertPt, const DataLayout &DL)
 If analyzeLoadFromClobberingStore returned an offset, this function can be used to actually perform the extraction of the bits from the store. More...
 
Constant * llvm::VNCoercion::getConstantStoreValueForLoad (Constant *SrcVal, unsigned Offset, Type *LoadTy, const DataLayout &DL)
 
Value * llvm::VNCoercion::getLoadValueForLoad (LoadInst *SrcVal, unsigned Offset, Type *LoadTy, Instruction *InsertPt, const DataLayout &DL)
 If analyzeLoadFromClobberingLoad returned an offset, this function can be used to actually perform the extraction of the bits from the load, including any necessary load widening. More...
 
Constant * llvm::VNCoercion::getConstantLoadValueForLoad (Constant *SrcVal, unsigned Offset, Type *LoadTy, const DataLayout &DL)
 
template<class T , class HelperClass >
Tllvm::VNCoercion::getMemInstValueForLoadHelper (MemIntrinsic *SrcInst, unsigned Offset, Type *LoadTy, HelperClass &Helper, const DataLayout &DL)
 
Value * llvm::VNCoercion::getMemInstValueForLoad (MemIntrinsic *SrcInst, unsigned Offset, Type *LoadTy, Instruction *InsertPt, const DataLayout &DL)
 If analyzeLoadFromClobberingMemInst returned an offset, this function can be used to actually perform the extraction of the bits from the memory intrinsic. More...
 
Constant * llvm::VNCoercion::getConstantMemInstValueForLoad (MemIntrinsic *SrcInst, unsigned Offset, Type *LoadTy, const DataLayout &DL)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "vncoerce"

Definition at line 10 of file VNCoercion.cpp.