aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Bolka <a@bolka.at>2009-07-29 05:35:53 +0000
committerAndreas Bolka <a@bolka.at>2009-07-29 05:35:53 +0000
commit15f72dbf972f056b1685786e5118148fb528f233 (patch)
tree700e798597427d154003045fa2d7ee08c3eb2ccf /include
parent45ce89ba080f4be72e4e49367567114800f6b3c5 (diff)
downloadexternal_llvm-15f72dbf972f056b1685786e5118148fb528f233.zip
external_llvm-15f72dbf972f056b1685786e5118148fb528f233.tar.gz
external_llvm-15f72dbf972f056b1685786e5118148fb528f233.tar.bz2
Skeleton for pairwise subscript testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/LoopDependenceAnalysis.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/llvm/Analysis/LoopDependenceAnalysis.h b/include/llvm/Analysis/LoopDependenceAnalysis.h
index 3eab665..56a6b6e 100644
--- a/include/llvm/Analysis/LoopDependenceAnalysis.h
+++ b/include/llvm/Analysis/LoopDependenceAnalysis.h
@@ -21,6 +21,7 @@
#define LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H
#include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Support/Allocator.h"
#include <iosfwd>
@@ -30,6 +31,7 @@ namespace llvm {
class AliasAnalysis;
class AnalysisUsage;
class ScalarEvolution;
+class SCEV;
class Value;
class raw_ostream;
@@ -43,17 +45,21 @@ class LoopDependenceAnalysis : public LoopPass {
/// TODO: doc
enum DependenceResult { Independent = 0, Dependent = 1, Unknown = 2 };
+ /// TODO: doc
+ struct Subscript {
+ /// TODO: Add distance, direction, breaking conditions, ...
+ };
+
/// DependencePair - Represents a data dependence relation between to memory
/// reference instructions.
- ///
- /// TODO: add subscripts vector
struct DependencePair : public FastFoldingSetNode {
Value *A;
Value *B;
DependenceResult Result;
+ SmallVector<Subscript, 4> Subscripts;
DependencePair(const FoldingSetNodeID &ID, Value *a, Value *b) :
- FastFoldingSetNode(ID), A(a), B(b), Result(Unknown) {}
+ FastFoldingSetNode(ID), A(a), B(b), Result(Unknown), Subscripts() {}
};
/// findOrInsertDependencePair - Return true if a DependencePair for the
@@ -62,7 +68,8 @@ class LoopDependenceAnalysis : public LoopPass {
bool findOrInsertDependencePair(Value*, Value*, DependencePair*&);
/// TODO: doc
- DependenceResult analysePair(DependencePair *P) const;
+ DependenceResult analyseSubscript(const SCEV*, const SCEV*, Subscript*) const;
+ DependenceResult analysePair(DependencePair*) const;
public:
static char ID; // Class identification, replacement for typeinfo
@@ -88,7 +95,6 @@ private:
BumpPtrAllocator PairAllocator;
}; // class LoopDependenceAnalysis
-
// createLoopDependenceAnalysisPass - This creates an instance of the
// LoopDependenceAnalysis pass.
//