diff options
author | Hongbin Zheng <etherzhhb@gmail.com> | 2011-05-03 13:46:58 +0000 |
---|---|---|
committer | Hongbin Zheng <etherzhhb@gmail.com> | 2011-05-03 13:46:58 +0000 |
commit | dbdebe28debbd1c49e494dd08135bce13186ac5c (patch) | |
tree | a3385abc977663041d2703505b0c43601cb06fef /polly/lib/Analysis/Dependences.cpp | |
parent | e79a5e65c0932bebf0b5bbd688de6fc49c32c9dc (diff) | |
download | bcm5719-llvm-dbdebe28debbd1c49e494dd08135bce13186ac5c.tar.gz bcm5719-llvm-dbdebe28debbd1c49e494dd08135bce13186ac5c.zip |
Refactor: Move 'isParallelFor' from codegen backend to Dependences analysis, so other passes can also use it.
llvm-svn: 130752
Diffstat (limited to 'polly/lib/Analysis/Dependences.cpp')
-rw-r--r-- | polly/lib/Analysis/Dependences.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/polly/lib/Analysis/Dependences.cpp b/polly/lib/Analysis/Dependences.cpp index 8b3600226a2..b63d3b280d8 100644 --- a/polly/lib/Analysis/Dependences.cpp +++ b/polly/lib/Analysis/Dependences.cpp @@ -31,8 +31,9 @@ #include "llvm/Support/CommandLine.h" #include <isl/flow.h> -#include <isl/map.h> -#include <isl/constraint.h> +#define CLOOG_INT_GMP 1 +#include <cloog/cloog.h> +#include <cloog/isl/cloog.h> using namespace polly; using namespace llvm; @@ -351,6 +352,13 @@ bool Dependences::isParallelDimension(isl_set *loopDomain, && isl_union_set_is_empty(nonValid_waw); } +bool Dependences::isParallelFor(const clast_for *f) { + isl_set *loopDomain = isl_set_from_cloog_domain(f->domain); + assert(loopDomain && "Cannot access domain of loop"); + + return isParallelDimension(loopDomain, isl_set_n_dim(loopDomain)); +} + void Dependences::printScop(raw_ostream &OS) const { OS.indent(4) << "Must dependences:\n"; OS.indent(8) << stringFromIslObj(must_dep) << "\n"; |