LLVM 22.0.0git
|
#include "llvm/Analysis/Loads.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumeBundleQueries.h"
#include "llvm/Analysis/LoopAccessAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Operator.h"
Go to the source code of this file.
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 270 of file Loads.cpp.
References A(), B(), llvm::cast(), llvm::dyn_cast(), and llvm::isa().
Referenced by getAvailableLoadStore(), and llvm::isSafeToLoadUnconditionally().
|
static |
Definition at line 555 of file Loads.cpp.
References DL, llvm::Value::getType(), llvm::ConstantRange::intersectWith(), llvm::ConstantRange::isEmptySet(), llvm::LocationSize::precise(), and llvm::Value::stripAndAccumulateConstantOffsets().
Referenced by llvm::findAvailablePtrLoadStore().
|
static |
Definition at line 577 of file Loads.cpp.
References AreEquivalentAddressValues(), llvm::CallingConv::C, llvm::ConstantFoldLoadFromConst(), DL, llvm::dyn_cast(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), llvm::GetPointerBaseWithConstantOffset(), llvm::APInt::getSplat(), llvm::Value::getType(), llvm::CastInst::isBitOrNoopPointerCastable(), llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >::isKnownLE(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), Ptr, llvm::Splat, and llvm::Value::stripPointerCasts().
Referenced by llvm::FindAvailableLoadedValue(), and llvm::findAvailablePtrLoadStore().
Definition at line 30 of file Loads.cpp.
References llvm::sampleprof::Base, and DL.
|
static |
Test if V is always a pointer to allocated and suitably aligned memory for a simple load or store.
TODO refactor this function to be able to search independently for Dereferencability and Alignment requirements.
Definition at line 71 of file Loads.cpp.
References llvm::RetainedKnowledge::ArgValue, assert(), llvm::sampleprof::Base, Call, DL, llvm::dyn_cast(), GEP, llvm::getArgumentAliasingToReturnedPointer(), llvm::APInt::getBoolValue(), llvm::getObjectSize(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::isa(), llvm::isAligned(), llvm::isDereferenceableAndAlignedPointer(), isDereferenceableAndAlignedPointerViaAssumption(), llvm::isKnownNonZero(), llvm::isValidAssumeForContext(), llvm::ObjectSizeOpts::NullIsUnknownSize, llvm::Offset, llvm::ObjectSizeOpts::RoundToAlign, Size, llvm::APInt::uge(), and llvm::Align::value().
|
static |
Look through assumes to see if both dereferencability and alignment can be proven by an assume if needed.
Definition at line 35 of file Loads.cpp.
References llvm::RetainedKnowledge::ArgValue, llvm::RetainedKnowledge::AttrKind, DL, llvm::getKnowledgeForValue(), llvm::isValidAssumeForContext(), Ptr, and llvm::Align::value().
Referenced by llvm::isDereferenceableAndAlignedInLoop(), and isDereferenceableAndAlignedPointer().
|
static |
Definition at line 824 of file Loads.cpp.
References DL, llvm::Value::getContext(), llvm::Type::getInt8Ty(), llvm::getUnderlyingObjectAggressive(), llvm::isa(), and llvm::isDereferenceablePointer().
Referenced by llvm::canReplacePointersIfEqual(), and llvm::canReplacePointersInUseIfEqual().
Definition at line 802 of file Loads.cpp.
References llvm::SmallVectorImpl< T >::insert(), llvm::isa(), llvm::Value::user_begin(), and llvm::Value::user_end().
Referenced by llvm::canReplacePointersInUseIfEqual().
|
static |
Definition at line 407 of file Loads.cpp.
References F, and llvm::Instruction::getFunction().
Referenced by llvm::isSafeToLoadUnconditionally(), and llvm::mustSuppressSpeculation().