diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-11 19:51:20 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-11 19:51:20 -0600 |
commit | cbe925bd7264c4e14681db16a14805670fd07c71 (patch) | |
tree | 7af56dae67337af763a1fa2c34daab9c7c85291d /src/transformations/loop.cc | |
parent | 740a983e76347a757e2c91bfaaddb6538f376006 (diff) | |
download | chill-cbe925bd7264c4e14681db16a14805670fd07c71.tar.gz chill-cbe925bd7264c4e14681db16a14805670fd07c71.tar.bz2 chill-cbe925bd7264c4e14681db16a14805670fd07c71.zip |
for loop index replacement
Diffstat (limited to 'src/transformations/loop.cc')
-rw-r--r-- | src/transformations/loop.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/transformations/loop.cc b/src/transformations/loop.cc index b3539a6..8f56be6 100644 --- a/src/transformations/loop.cc +++ b/src/transformations/loop.cc @@ -478,6 +478,9 @@ void Loop::align_loops(std::vector<ir_tree_node*> &ir_tree, std::vector<std::str CG_outputRepr *ivar = ocg->CreateIdent(iname); vars_to_be_replaced.push_back(clp->index()->name()); vars_replacement.push_back(ivar); + ocg->CreateSubstitutedStmt(0,new CG_chillRepr(clp->chillforstmt->getInit()),vars_to_be_replaced,vars_replacement,false); + ocg->CreateSubstitutedStmt(0,new CG_chillRepr(clp->chillforstmt->getInc()),vars_to_be_replaced,vars_replacement,false); + ocg->CreateSubstitutedStmt(0,new CG_chillRepr(clp->chillforstmt->getCond()),vars_to_be_replaced,vars_replacement,false); // FIXME: this breaks abstraction if (clp->step_size()<0) { IR_CONDITION_TYPE cond = clp->conditionoperator; |