summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LICM.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2019-07-09 11:35:35 +0000
committerTim Northover <tnorthover@apple.com>2019-07-09 11:35:35 +0000
commit60afa49abed6efdd7196d38ec884727090cfe373 (patch)
treea9af173067a23e1f6fa896cfb31bde34ec7cb3b3 /llvm/lib/Transforms/Scalar/LICM.cpp
parent01eaae6dd12862cda6b42d565a215b07a178aba6 (diff)
downloadbcm5719-llvm-60afa49abed6efdd7196d38ec884727090cfe373.tar.gz
bcm5719-llvm-60afa49abed6efdd7196d38ec884727090cfe373.zip
OpaquePtr: add Type parameter to Loads analysis API.
This makes the functions in Loads.h require a type to be specified independently of the pointer Value so that when pointers have no structure other than address-space, it can still do its job. Most callers had an obvious memory operation handy to provide this type, but a SROA and ArgumentPromotion were doing more complicated analysis. They get updated to merge the properties of the various instructions they were considering. llvm-svn: 365468
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LICM.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 2d27a660102..3c5e773f793 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -2016,8 +2016,8 @@ bool llvm::promoteLoopAccessesToScalars(
// deref info through it.
if (!DereferenceableInPH) {
DereferenceableInPH = isDereferenceableAndAlignedPointer(
- Store->getPointerOperand(), Store->getAlignment(), MDL,
- Preheader->getTerminator(), DT);
+ Store->getPointerOperand(), Store->getValueOperand()->getType(),
+ Store->getAlignment(), MDL, Preheader->getTerminator(), DT);
}
} else
return false; // Not a load or store.
OpenPOWER on IntegriCloud