-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RotateForLoops] Support for negative bounds
This commit improves the loop rotation pass by letting it rewrite for loops with negative bounds and which provably execute at least once. As an implication of this change, the predicate of the comparison operation inserted in the created do-while loop is now determined by the method which assesses the legality of the rotation: it is signed if the loop's lower bound + the step cannot be guaranteed to be non-negative, and unsigned otherwise. This commit also makes some cosmetic changes to the pass, generally making its implementation cleaner.
- Loading branch information
1 parent
7db4619
commit aa8eca2
Showing
1 changed file
with
66 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters