summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslAst.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2015-03-05 00:43:48 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2015-03-05 00:43:48 +0000
commit7e6424ba5a6d64040346f775e10c7d4e3cb0c92c (patch)
treeb0f9bfbd4718d0418aad51ead1cc695f88f5946e /polly/lib/CodeGen/IslAst.cpp
parent6745822fd1cf54aa68196b317cdbc139418b8aa0 (diff)
downloadbcm5719-llvm-7e6424ba5a6d64040346f775e10c7d4e3cb0c92c.tar.gz
bcm5719-llvm-7e6424ba5a6d64040346f775e10c7d4e3cb0c92c.zip
Create a dependence struct to hold dependence information for a SCoP.
The new Dependences struct in the DependenceInfo holds all information that was formerly part of the DependenceInfo. It also provides the same interface for the user to access this information. This is another step to a more general ScopPass interface that does allow multiple SCoPs to be "in flight". llvm-svn: 231327
Diffstat (limited to 'polly/lib/CodeGen/IslAst.cpp')
-rw-r--r--polly/lib/CodeGen/IslAst.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp
index 666d7fd9158..aa103f65b67 100644
--- a/polly/lib/CodeGen/IslAst.cpp
+++ b/polly/lib/CodeGen/IslAst.cpp
@@ -73,7 +73,7 @@ static cl::opt<bool> NoEarlyExit(
namespace polly {
class IslAst {
public:
- IslAst(Scop *Scop, DependenceInfo &D);
+ IslAst(Scop *Scop, const Dependences &D);
~IslAst();
@@ -111,7 +111,7 @@ struct AstBuildUserInfo {
: Deps(nullptr), InParallelFor(false), LastForNodeId(nullptr) {}
/// @brief The dependence information used for the parallelism check.
- DependenceInfo *Deps;
+ const Dependences *Deps;
/// @brief Flag to indicate that we are inside a parallel for node.
bool InParallelFor;
@@ -197,21 +197,20 @@ static isl_printer *cbPrintFor(__isl_take isl_printer *Printer,
/// we can perform the parallelism check as we are only interested in a zero
/// (or non-zero) dependence distance on the dimension in question.
static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build,
- DependenceInfo *D,
+ const Dependences *D,
IslAstUserPayload *NodeInfo) {
if (!D->hasValidDependences())
return false;
isl_union_map *Schedule = isl_ast_build_get_schedule(Build);
- isl_union_map *Deps =
- D->getDependences(DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_WAW |
- DependenceInfo::TYPE_WAR);
+ isl_union_map *Deps = D->getDependences(
+ Dependences::TYPE_RAW | Dependences::TYPE_WAW | Dependences::TYPE_WAR);
if (!D->isParallel(Schedule, Deps, &NodeInfo->MinimalDependenceDistance) &&
!isl_union_map_free(Schedule))
return false;
- isl_union_map *RedDeps = D->getDependences(DependenceInfo::TYPE_TC_RED);
+ isl_union_map *RedDeps = D->getDependences(Dependences::TYPE_TC_RED);
if (!D->isParallel(Schedule, RedDeps))
NodeInfo->IsReductionParallel = true;
@@ -363,7 +362,7 @@ static bool benefitsFromPolly(Scop *Scop, bool PerformParallelTest) {
return true;
}
-IslAst::IslAst(Scop *Scop, DependenceInfo &D)
+IslAst::IslAst(Scop *Scop, const Dependences &D)
: S(Scop), Root(nullptr), RunCondition(nullptr) {
bool PerformParallelTest = PollyParallel || DetectParallel ||
@@ -428,7 +427,7 @@ bool IslAstInfo::runOnScop(Scop &Scop) {
S = &Scop;
- DependenceInfo &D = getAnalysis<DependenceInfo>();
+ const Dependences &D = getAnalysis<DependenceInfo>().getDependences();
Ast = new IslAst(&Scop, D);
OpenPOWER on IntegriCloud