summaryrefslogtreecommitdiff
path: root/include/dep.hh
diff options
context:
space:
mode:
Diffstat (limited to 'include/dep.hh')
-rw-r--r--include/dep.hh32
1 files changed, 14 insertions, 18 deletions
diff --git a/include/dep.hh b/include/dep.hh
index 6c535ce..ed5a83d 100644
--- a/include/dep.hh
+++ b/include/dep.hh
@@ -1,19 +1,6 @@
#ifndef DEP_HH
#define DEP_HH
-/*!
- * \file
- * \brief Data dependence vector and graph.
- *
- * All dependence vectors are normalized, i.e., the first non-zero distance
- * must be positve. Thus the correct dependence meaning can be given based on
- * source/destination pair's read/write type. Suppose for a dependence vector
- * 1, 0~5, -3), we want to permute the first and the second dimension,
- * the result would be two dependence vectors (0, 1, -3) and (1~5, 1, -3).
- * All operations on dependence vectors are non-destructive, i.e., new
- * dependence vectors are returned.
- */
-
#include <omega.h>
#include "graph.hh"
#include "ir_code.hh"
@@ -27,9 +14,12 @@ typedef std::vector<DependenceVector> DependenceList;
struct DependenceVector {
DependenceType type;
IR_Symbol *sym;
-
- bool is_reduction; //!< used to identify a class of flow dependence
- //!< that can be broken
+
+ bool from_same_stmt; // Manu
+ bool is_reduction_cand; // Manu
+
+ bool is_reduction; // used to identify a class of flow dependence
+ // that can be broken
std::vector<omega::coef_t> lbounds;
std::vector<omega::coef_t> ubounds;
@@ -39,11 +29,14 @@ struct DependenceVector {
type = DEP_UNKNOWN;
sym = NULL;
is_reduction = false;
+ from_same_stmt = false; // Manu
+ is_reduction_cand = false; // Manu
quasi = false;
is_scalar_dependence = false;
}
+ // DependenceVector(int size);
DependenceVector(const DependenceVector &that);
- ~DependenceVector() {delete sym;}
+ ~DependenceVector() { delete sym; } // is this legal? TODO
DependenceVector &operator=(const DependenceVector &that);
bool is_data_dependence() const;
@@ -52,7 +45,7 @@ struct DependenceVector {
bool has_been_carried_at(int dim) const;
bool has_been_carried_before(int dim) const;
- // TODO the following functions will be cleaned up or removed later
+ // the following functions will be cleaned up or removed later
bool isZero() const;
bool isPositive() const;
bool isNegative() const;
@@ -67,6 +60,7 @@ struct DependenceVector {
std::vector<DependenceVector> normalize() const;
std::vector<DependenceVector> permute(const std::vector<int> &pi) const;
DependenceVector reverse() const;
+ // std::vector<DependenceVector> matrix(const std::vector<std::vector<int> > &M) const;
DependenceType getType() const;
friend std::ostream& operator<<(std::ostream &os, const DependenceVector &d);
};
@@ -83,8 +77,10 @@ public:
DependenceGraph() { num_dim_ = 0; }
~DependenceGraph() {}
int num_dim() const { return num_dim_; }
+// DependenceGraph permute(const std::vector<int> &pi) const;
DependenceGraph permute(const std::vector<int> &pi,
const std::set<int> &active = std::set<int>()) const;
+ // DependenceGraph matrix(const std::vector<std::vector<int> > &M) const;
DependenceGraph subspace(int dim) const;
bool isPositive() const;
bool hasPositive(int dim) const;