aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorAndreas Bolka <a@bolka.at>2009-07-30 02:26:01 +0000
committerAndreas Bolka <a@bolka.at>2009-07-30 02:26:01 +0000
commit713395950a615b2fb932fc25a6723612ca09b23c (patch)
tree4cb4d15555e06e1c4d2082b1f8f1b01011b6f380 /lib/Analysis
parentbb916fbadd6bfa37ce8009f49eb1d4ec9f34a4b6 (diff)
downloadexternal_llvm-713395950a615b2fb932fc25a6723612ca09b23c.zip
external_llvm-713395950a615b2fb932fc25a6723612ca09b23c.tar.gz
external_llvm-713395950a615b2fb932fc25a6723612ca09b23c.tar.bz2
Equal SCEVs of a subscript give rise to dependence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/LoopDependenceAnalysis.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Analysis/LoopDependenceAnalysis.cpp b/lib/Analysis/LoopDependenceAnalysis.cpp
index 51f6c3a..0c8bbd7 100644
--- a/lib/Analysis/LoopDependenceAnalysis.cpp
+++ b/lib/Analysis/LoopDependenceAnalysis.cpp
@@ -127,7 +127,17 @@ LoopDependenceAnalysis::DependenceResult
LoopDependenceAnalysis::analyseSubscript(const SCEV *A,
const SCEV *B,
Subscript *S) const {
- return Unknown; // TODO: Implement.
+ DEBUG(errs() << " Testing subscript: " << *A << ", " << *B << "\n");
+
+ if (A == B) {
+ DEBUG(errs() << " -> [D] same SCEV\n");
+ return Dependent;
+ }
+
+ // TODO: Implement ZIV/SIV/MIV testers.
+
+ DEBUG(errs() << " -> [?] cannot analyse subscript\n");
+ return Unknown;
}
LoopDependenceAnalysis::DependenceResult