diff options
author | Andreas Bolka <a@bolka.at> | 2009-07-30 02:26:01 +0000 |
---|---|---|
committer | Andreas Bolka <a@bolka.at> | 2009-07-30 02:26:01 +0000 |
commit | 713395950a615b2fb932fc25a6723612ca09b23c (patch) | |
tree | 4cb4d15555e06e1c4d2082b1f8f1b01011b6f380 /lib/Analysis/LoopDependenceAnalysis.cpp | |
parent | bb916fbadd6bfa37ce8009f49eb1d4ec9f34a4b6 (diff) |
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/LoopDependenceAnalysis.cpp')
-rw-r--r-- | lib/Analysis/LoopDependenceAnalysis.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Analysis/LoopDependenceAnalysis.cpp b/lib/Analysis/LoopDependenceAnalysis.cpp index 51f6c3aafd..0c8bbd7a56 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 |