LLVM
8.0.1
|
#include "llvm/Analysis/Loads.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Statepoint.h"
Go to the source code of this file.
Functions | |
static bool | isAligned (const Value *Base, const APInt &Offset, unsigned Align, const DataLayout &DL) |
static bool | isAligned (const Value *Base, unsigned Align, const DataLayout &DL) |
static bool | isDereferenceableAndAlignedPointer (const Value *V, unsigned Align, const APInt &Size, const DataLayout &DL, const Instruction *CtxI, const DominatorTree *DT, SmallPtrSetImpl< const Value *> &Visited) |
Test if V is always a pointer to allocated and suitably aligned memory for a simple load or store. More... | |
static bool | AreEquivalentAddressValues (const Value *A, const Value *B) |
Test if A and B will obviously have the same value. More... | |
Test if A and B will obviously have the same value.
This includes recognizing that t0 and t1 will have the same value in code like this:
Definition at line 170 of file Loads.cpp.
Referenced by llvm::FindAvailablePtrLoadStore(), and llvm::isSafeToLoadUnconditionally().
|
static |
Definition at line 28 of file Loads.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, assert(), llvm::DataLayout::getABITypeAlignment(), llvm::APInt::getBitWidth(), llvm::Value::getPointerAlignment(), llvm::Type::getPointerElementType(), llvm::Value::getType(), and llvm::Type::isSized().
Referenced by isAligned(), isDereferenceableAndAlignedPointer(), llvm::X86InstrInfo::loadRegFromAddr(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::storeRegToAddr(), llvm::X86InstrInfo::storeRegToStackSlot(), and llvm::X86InstrInfo::unfoldMemoryOperand().
Definition at line 45 of file Loads.cpp.
References assert(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSizeInBits(), isAligned(), and llvm::Type::isSized().
|
static |
Test if V is always a pointer to allocated and suitably aligned memory for a simple load or store.
Definition at line 54 of file Loads.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::MCID::Call, GEP, llvm::getArgumentAliasingToReturnedPointer(), llvm::APInt::getBitWidth(), llvm::Value::getPointerDereferenceableBytes(), llvm::SmallPtrSetImpl< PtrType >::insert(), isAligned(), llvm::isDereferenceableAndAlignedPointer(), llvm::isKnownNonZero(), llvm::APInt::isMinValue(), llvm::APInt::isNegative(), llvm::NVPTX::PTXCvtMode::RP, llvm::APInt::sextOrTrunc(), Size, and llvm::APInt::urem().
Referenced by llvm::isDereferenceableAndAlignedPointer().