-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove special-case lowering for
for i = a:b
loops (ref #5355)
this fixes some edge-case loops that the special lowering did not handle correctly. colon() now checks for overflow in computing the length, which avoids some buggy Range1s that used to be possible. this required some changes to make sure Range1 is fast enough: specialized start, done, next, and a hack to avoid one of the checks and allow better inlining. in general performance is about the same, but a few cases are actually faster, since Range1 is now faster (comprehensions used Range1 instead of the special-case lowering, for example). also, more loops should be vectorizable when the appropriate LLVM passes are enabled. all that plus better correctness and a simpler front-end, and I'm sold.
- Loading branch information
1 parent
efde013
commit 0860767
Showing
3 changed files
with
91 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
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
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