summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Loads.cpp
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-01-22 01:51:51 +0000
committerEduard Burtescu <edy.burt@gmail.com>2016-01-22 01:51:51 +0000
commite2a69178493c02eaabab69a418b39746e17b5978 (patch)
treeb6ed47ab22fbc570fd19aea02cdead0ae7ab0835 /llvm/lib/Analysis/Loads.cpp
parent710d9f838536885134fbcb68b486df9e68636b70 (diff)
downloadbcm5719-llvm-e2a69178493c02eaabab69a418b39746e17b5978.tar.gz
bcm5719-llvm-e2a69178493c02eaabab69a418b39746e17b5978.zip
[opaque pointer types] [NFC] FindAvailableLoadedValue: take LoadInst instead of just the pointer.
Reviewers: mjacob, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16422 llvm-svn: 258477
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r--llvm/lib/Analysis/Loads.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index 5b2113a19ee..1fb46b691d1 100644
--- a/llvm/lib/Analysis/Loads.cpp
+++ b/llvm/lib/Analysis/Loads.cpp
@@ -196,14 +196,15 @@ llvm::DefMaxInstsToScan("available-load-scan-limit", cl::init(6), cl::Hidden,
/// If \c AATags is non-null and a load or store is found, the AA tags from the
/// load or store are recorded there. If there are no AA tags or if no access is
/// found, it is left unmodified.
-Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
+Value *llvm::FindAvailableLoadedValue(LoadInst *Load, BasicBlock *ScanBB,
BasicBlock::iterator &ScanFrom,
unsigned MaxInstsToScan,
AliasAnalysis *AA, AAMDNodes *AATags) {
if (MaxInstsToScan == 0)
MaxInstsToScan = ~0U;
- Type *AccessTy = cast<PointerType>(Ptr->getType())->getElementType();
+ Value *Ptr = Load->getPointerOperand();
+ Type *AccessTy = Load->getType();
const DataLayout &DL = ScanBB->getModule()->getDataLayout();
OpenPOWER on IntegriCloud