[llvm] r275465 - [ValueTracking] Use Instruction::getFunction; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 14 13:19:01 PDT 2016
Author: sanjoy
Date: Thu Jul 14 15:19:01 2016
New Revision: 275465
URL: http://llvm.org/viewvc/llvm-project?rev=275465&view=rev
Log:
[ValueTracking] Use Instruction::getFunction; NFC
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=275465&r1=275464&r2=275465&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Thu Jul 14 15:19:01 2016
@@ -3107,11 +3107,9 @@ bool llvm::isSafeToSpeculativelyExecute(
const LoadInst *LI = cast<LoadInst>(Inst);
if (!LI->isUnordered() ||
// Speculative load may create a race that did not exist in the source.
- LI->getParent()->getParent()->hasFnAttribute(
- Attribute::SanitizeThread) ||
+ LI->getFunction()->hasFnAttribute(Attribute::SanitizeThread) ||
// Speculative load may load data from dirty regions.
- LI->getParent()->getParent()->hasFnAttribute(
- Attribute::SanitizeAddress))
+ LI->getFunction()->hasFnAttribute(Attribute::SanitizeAddress))
return false;
const DataLayout &DL = LI->getModule()->getDataLayout();
return isDereferenceableAndAlignedPointer(LI->getPointerOperand(),
More information about the llvm-commits
mailing list