summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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/Transforms
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/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 1e75406dc4b..086e01b72b3 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -791,7 +791,7 @@ Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
BasicBlock::iterator BBI(LI);
AAMDNodes AATags;
if (Value *AvailableVal =
- FindAvailableLoadedValue(Op, LI.getParent(), BBI,
+ FindAvailableLoadedValue(&LI, LI.getParent(), BBI,
DefMaxInstsToScan, AA, &AATags)) {
if (LoadInst *NLI = dyn_cast<LoadInst>(AvailableVal)) {
unsigned KnownIDs[] = {
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index dcdcfed66e6..3a4c19a16c6 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -952,7 +952,7 @@ bool JumpThreading::SimplifyPartiallyRedundantLoad(LoadInst *LI) {
BasicBlock::iterator BBIt(LI);
if (Value *AvailableVal =
- FindAvailableLoadedValue(LoadedPtr, LoadBB, BBIt, DefMaxInstsToScan)) {
+ FindAvailableLoadedValue(LI, LoadBB, BBIt, DefMaxInstsToScan)) {
// If the value of the load is locally available within the block, just use
// it. This frequently occurs for reg2mem'd allocas.
//cerr << "LOAD ELIMINATED:\n" << *BBIt << *LI << "\n";
@@ -994,7 +994,7 @@ bool JumpThreading::SimplifyPartiallyRedundantLoad(LoadInst *LI) {
// Scan the predecessor to see if the value is available in the pred.
BBIt = PredBB->end();
AAMDNodes ThisAATags;
- Value *PredAvailable = FindAvailableLoadedValue(LoadedPtr, PredBB, BBIt,
+ Value *PredAvailable = FindAvailableLoadedValue(LI, PredBB, BBIt,
DefMaxInstsToScan,
nullptr, &ThisAATags);
if (!PredAvailable) {
OpenPOWER on IntegriCloud