diff options
Diffstat (limited to 'polly/lib/CodeGen/IslCodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index 007a4fce2af..a3876f19509 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -65,8 +65,8 @@ public: : S(S), Builder(Builder), Annotator(Annotator), Rewriter(new SCEVExpander(SE, "polly")), ExprBuilder(Builder, IDToValue, *Rewriter), - BlockGen(Builder, LI, SE, DT, &ExprBuilder), P(P), DL(DL), LI(LI), - SE(SE), DT(DT) {} + BlockGen(Builder, LI, SE, DT, &ExprBuilder), RegionGen(BlockGen), P(P), + DL(DL), LI(LI), SE(SE), DT(DT) {} ~IslNodeBuilder() { delete Rewriter; } @@ -84,6 +84,10 @@ private: IslExprBuilder ExprBuilder; BlockGenerator BlockGen; + + /// @brief Generator for region statements. + RegionGenerator RegionGen; + Pass *P; const DataLayout &DL; LoopInfo &LI; @@ -800,7 +804,10 @@ void IslNodeBuilder::createUser(__isl_take isl_ast_node *User) { Stmt->setAstBuild(IslAstInfo::getBuild(User)); createSubstitutions(Expr, Stmt, VMap, LTS); - BlockGen.copyBB(*Stmt, VMap, LTS); + if (Stmt->isBlockStmt()) + BlockGen.copyStmt(*Stmt, VMap, LTS); + else + RegionGen.copyStmt(*Stmt, VMap, LTS); isl_ast_node_free(User); isl_id_free(Id); |

