diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-09-19 18:09:39 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-09-19 19:25:22 -0400 |
commit | 2adae8e1b7dfda5eb7b9a44793dd84a036a9cd15 (patch) | |
tree | 623df768dc3f98a61abae2d9141ed90b9c463df4 /llvm/lib/Analysis/Loads.cpp | |
parent | c8674014072c0b44218776896eb38f9f8fe1abe5 (diff) | |
download | llvm-2adae8e1b7dfda5eb7b9a44793dd84a036a9cd15.zip llvm-2adae8e1b7dfda5eb7b9a44793dd84a036a9cd15.tar.gz llvm-2adae8e1b7dfda5eb7b9a44793dd84a036a9cd15.tar.bz2 |
VectorCombine: Pass through AssumptionCache
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r-- | llvm/lib/Analysis/Loads.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp index 5a693c2..f2fa9e0 100644 --- a/llvm/lib/Analysis/Loads.cpp +++ b/llvm/lib/Analysis/Loads.cpp @@ -327,12 +327,13 @@ bool llvm::isDereferenceableAndAlignedInLoop(LoadInst *LI, Loop *L, bool llvm::isSafeToLoadUnconditionally(Value *V, Align Alignment, APInt &Size, const DataLayout &DL, Instruction *ScanFrom, + AssumptionCache *AC, const DominatorTree *DT, const TargetLibraryInfo *TLI) { // If DT is not specified we can't make context-sensitive query const Instruction* CtxI = DT ? ScanFrom : nullptr; - if (isDereferenceableAndAlignedPointer(V, Alignment, Size, DL, CtxI, nullptr, - DT, TLI)) + if (isDereferenceableAndAlignedPointer(V, Alignment, Size, DL, CtxI, AC, DT, + TLI)) return true; if (!ScanFrom) @@ -403,13 +404,15 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Align Alignment, APInt &Size, bool llvm::isSafeToLoadUnconditionally(Value *V, Type *Ty, Align Alignment, const DataLayout &DL, Instruction *ScanFrom, + AssumptionCache *AC, const DominatorTree *DT, const TargetLibraryInfo *TLI) { TypeSize TySize = DL.getTypeStoreSize(Ty); if (TySize.isScalable()) return false; APInt Size(DL.getIndexTypeSizeInBits(V->getType()), TySize.getFixedValue()); - return isSafeToLoadUnconditionally(V, Alignment, Size, DL, ScanFrom, DT, TLI); + return isSafeToLoadUnconditionally(V, Alignment, Size, DL, ScanFrom, AC, DT, + TLI); } /// DefMaxInstsToScan - the default number of maximum instructions |