1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[ValueTracking] Use Instruction::getFunction; NFC

llvm-svn: 275465
This commit is contained in:
Sanjoy Das 2016-07-14 20:19:01 +00:00
parent 7133008e1f
commit f04600393d

View File

@ -3107,11 +3107,9 @@ bool llvm::isSafeToSpeculativelyExecute(const Value *V,
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(),