summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopDependenceAnalysis.cpp
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
commit31d9fa2ad1c8eb9ec403594181711c4c9f5cb37c (patch)
tree14dc52041cfb8bdedd59f9b7a2e557203d4acf22 /llvm/lib/Analysis/LoopDependenceAnalysis.cpp
parent54914e2b3ac7d4827db5e6113d5384fb435fc19c (diff)
downloadbcm5719-llvm-31d9fa2ad1c8eb9ec403594181711c4c9f5cb37c.tar.gz
bcm5719-llvm-31d9fa2ad1c8eb9ec403594181711c4c9f5cb37c.zip
Equal SCEVs of a subscript give rise to dependence.
llvm-svn: 77570
Diffstat (limited to 'llvm/lib/Analysis/LoopDependenceAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/LoopDependenceAnalysis.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopDependenceAnalysis.cpp b/llvm/lib/Analysis/LoopDependenceAnalysis.cpp
index 51f6c3aafd9..0c8bbd7a568 100644
--- a/llvm/lib/Analysis/LoopDependenceAnalysis.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud