diff options
author | Silviu Baranga <silviu.baranga@arm.com> | 2016-05-10 12:28:49 +0000 |
---|---|---|
committer | Silviu Baranga <silviu.baranga@arm.com> | 2016-05-10 12:28:49 +0000 |
commit | adf4b739eac40feee28bd6fcd89ebafa0f2247e1 (patch) | |
tree | 4c6a08bda32aee1f705e5b9200336f01533bad5a /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | aa1d638800b28e1de11daf6a340f8810ba2e07ac (diff) | |
download | bcm5719-llvm-adf4b739eac40feee28bd6fcd89ebafa0f2247e1.tar.gz bcm5719-llvm-adf4b739eac40feee28bd6fcd89ebafa0f2247e1.zip |
[LAA] Use re-written SCEV expressions when computing distances
This removes a redundant stride versioning step (we already
do it in getPtrStride, so it has no effect) and uses PSE to
get the SCEV expressions for the source and destination
(this might have changed when getPtrStride was called).
I discovered this through code inspection, and couldn't
produce a regression test for it.
llvm-svn: 269052
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 630ff7639b5..173b03178b5 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1158,20 +1158,15 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx, BPtr->getType()->getPointerAddressSpace()) return Dependence::Unknown; - const SCEV *AScev = replaceSymbolicStrideSCEV(PSE, Strides, APtr); - const SCEV *BScev = replaceSymbolicStrideSCEV(PSE, Strides, BPtr); - int StrideAPtr = getPtrStride(PSE, APtr, InnermostLoop, Strides, true); int StrideBPtr = getPtrStride(PSE, BPtr, InnermostLoop, Strides, true); - const SCEV *Src = AScev; - const SCEV *Sink = BScev; + const SCEV *Src = PSE.getSCEV(APtr); + const SCEV *Sink = PSE.getSCEV(BPtr); // If the induction step is negative we have to invert source and sink of the // dependence. if (StrideAPtr < 0) { - //Src = BScev; - //Sink = AScev; std::swap(APtr, BPtr); std::swap(Src, Sink); std::swap(AIsWrite, BIsWrite); |