diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-07-14 20:19:01 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-07-14 20:19:01 +0000 |
| commit | b66374c634d7b53e6c39b1e2fb3c940b84067346 (patch) | |
| tree | 8bf7ff54cc40e7a249618c7381bdf740ef127e09 | |
| parent | 5cd6abdd237258c5d5425de936d1002ae64810d5 (diff) | |
| download | bcm5719-llvm-b66374c634d7b53e6c39b1e2fb3c940b84067346.tar.gz bcm5719-llvm-b66374c634d7b53e6c39b1e2fb3c940b84067346.zip | |
[ValueTracking] Use Instruction::getFunction; NFC
llvm-svn: 275465
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 3277c3c47b8..f2b40787443 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -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(), |

