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 | 31d9fa2ad1c8eb9ec403594181711c4c9f5cb37c (patch) | |
| tree | 14dc52041cfb8bdedd59f9b7a2e557203d4acf22 /llvm/lib/Analysis/LoopDependenceAnalysis.cpp | |
| parent | 54914e2b3ac7d4827db5e6113d5384fb435fc19c (diff) | |
| download | llvm-31d9fa2ad1c8eb9ec403594181711c4c9f5cb37c.zip llvm-31d9fa2ad1c8eb9ec403594181711c4c9f5cb37c.tar.gz llvm-31d9fa2ad1c8eb9ec403594181711c4c9f5cb37c.tar.bz2 | |
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.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopDependenceAnalysis.cpp b/llvm/lib/Analysis/LoopDependenceAnalysis.cpp index 51f6c3a..0c8bbd7 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 |
