diff options
author | Philip Reames <listmail@philipreames.com> | 2021-03-24 17:51:06 -0700 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2021-03-24 17:52:04 -0700 |
commit | 9a82f42d12f85386b9e654f2c01cf0bf493482e6 (patch) | |
tree | 35a6f853ca270a1c3efed29777cc10a6edd8e00f /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 7ad55a3df51a0d8c904fec3f52117932c23f0b01 (diff) | |
download | llvm-9a82f42d12f85386b9e654f2c01cf0bf493482e6.zip llvm-9a82f42d12f85386b9e654f2c01cf0bf493482e6.tar.gz llvm-9a82f42d12f85386b9e654f2c01cf0bf493482e6.tar.bz2 |
Plumb TLI through isSafeToExecuteUnconditionally [NFC]
Split from D95815 to reduce patch size. Isn't (yet) used for anything, only the client side is wired up.
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index cd08c4e..7b43ce0 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -4411,7 +4411,8 @@ bool llvm::mustSuppressSpeculation(const LoadInst &LI) { bool llvm::isSafeToSpeculativelyExecute(const Value *V, const Instruction *CtxI, - const DominatorTree *DT) { + const DominatorTree *DT, + const TargetLibraryInfo *TLI) { const Operator *Inst = dyn_cast<Operator>(V); if (!Inst) return false; @@ -4458,7 +4459,7 @@ bool llvm::isSafeToSpeculativelyExecute(const Value *V, const DataLayout &DL = LI->getModule()->getDataLayout(); return isDereferenceableAndAlignedPointer( LI->getPointerOperand(), LI->getType(), MaybeAlign(LI->getAlignment()), - DL, CtxI, DT); + DL, CtxI, DT, TLI); } case Instruction::Call: { auto *CI = cast<const CallInst>(Inst); |