[PATCH] D16232: Use isSafeToLoadUnconditionally in isSafeToSpeculativelyExecute
Artur Pilipenko via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 09:44:22 PST 2016
apilipenko created this revision.
apilipenko added reviewers: hfinkel, reames.
apilipenko added a subscriber: llvm-commits.
http://reviews.llvm.org/D16232
Files:
lib/Analysis/ValueTracking.cpp
Index: lib/Analysis/ValueTracking.cpp
===================================================================
--- lib/Analysis/ValueTracking.cpp
+++ lib/Analysis/ValueTracking.cpp
@@ -18,6 +18,7 @@
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/MemoryBuiltins.h"
+#include "llvm/Analysis/Loads.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/ConstantRange.h"
@@ -3390,8 +3391,10 @@
Attribute::SanitizeAddress))
return false;
const DataLayout &DL = LI->getModule()->getDataLayout();
- return isDereferenceableAndAlignedPointer(
- LI->getPointerOperand(), LI->getAlignment(), DL, CtxI, DT, TLI);
+ return
+ isSafeToLoadUnconditionally(const_cast<Value*>(LI->getPointerOperand()),
+ LI->getAlignment(),
+ const_cast<Instruction*>(CtxI), DL, DT, TLI);
}
case Instruction::Call: {
if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16232.45005.patch
Type: text/x-patch
Size: 1068 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160115/f0f1f9c6/attachment.bin>
More information about the llvm-commits
mailing list