pdamme opened a new pull request #1165: URL: https://github.com/apache/systemds/pull/1165
This commit adds a new StatementBlockRewriteRule removing (par)for-loops which are known to iterate over an empty sequence, and, thus, will not perform a single iteration. This works if the loop's from, to, and increment are constants (possibly DML script arguments, and after constant folding). Furthermore, OptimizerUtils has a new flag determining whether this rule shall be applied. In ProgramRewriter's default rule sequence, this new rule is inserted directly after the removal of unnecessary branches, since they have a lot in common. Merging subsequent blocks is done once afterwards if any of removing unnecessary branches or removing (par)for-loops shall be applied. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
