diff options
| author | Tobias Grosser <tobias@grosser.es> | 2014-06-28 08:59:38 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2014-06-28 08:59:38 +0000 |
| commit | bc4ef90802fcc5314d430cab04c03b1eaddf5c8e (patch) | |
| tree | ddd601650d9e39f46e3586ceb5bc55edd7088a13 /polly/lib/CodeGen/IslAst.cpp | |
| parent | f76e6d8e6b29d8722c6d3476822a30fc89000ff1 (diff) | |
| download | bcm5719-llvm-bc4ef90802fcc5314d430cab04c03b1eaddf5c8e.tar.gz bcm5719-llvm-bc4ef90802fcc5314d430cab04c03b1eaddf5c8e.zip | |
Remove redundant code and use C++ range fors
llvm-svn: 211980
Diffstat (limited to 'polly/lib/CodeGen/IslAst.cpp')
| -rw-r--r-- | polly/lib/CodeGen/IslAst.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index b31f7dcf52b..6a1b03d326a 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -69,7 +69,6 @@ private: isl_ast_node *Root; isl_ast_expr *RunCondition; - __isl_give isl_union_map *getSchedule(); void buildRunCondition(__isl_keep isl_ast_build *Context); }; } // End namespace polly. @@ -366,7 +365,8 @@ IslAst::IslAst(Scop *Scop, Dependences &D) : S(Scop) { Context = isl_ast_build_set_at_each_domain(Context, AtEachDomain, nullptr); - isl_union_map *Schedule = getSchedule(); + isl_union_map *Schedule = + isl_union_map_intersect_domain(S->getSchedule(), S->getDomains()); Function *F = Scop->getRegion().getEntry()->getParent(); (void)F; @@ -395,20 +395,6 @@ IslAst::IslAst(Scop *Scop, Dependences &D) : S(Scop) { DEBUG(pprint(dbgs())); } -__isl_give isl_union_map *IslAst::getSchedule() { - isl_union_map *Schedule = isl_union_map_empty(S->getParamSpace()); - - for (ScopStmt *Stmt : *S) { - isl_map *StmtSchedule = Stmt->getScattering(); - - StmtSchedule = isl_map_intersect_domain(StmtSchedule, Stmt->getDomain()); - Schedule = - isl_union_map_union(Schedule, isl_union_map_from_map(StmtSchedule)); - } - - return Schedule; -} - IslAst::~IslAst() { isl_ast_node_free(Root); isl_ast_expr_free(RunCondition); |

