-
-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add optimizer guardrails, refactor (#2914)
this commit factors out and generalizes the optimizer logic for comparison operators. it clarifies the logic for dealing with boundary cases, and cleans up the control flow in the optimizer in general. it also adds an assembly peephole optimization to help optimize the assembly generated by the comparator pass. this commit also introduces a new IR keyword, "unique_symbol". it functions as a guardrail to help ensure optimizer passes are sane. it is a statement that codegen can insert into the IR, and sanity checks will be performed to make sure that the statement is not optimized out, and in some cases, to ensure that the statement shows up in the optimized IR. it can be thought of as a very primitive effects tracking framework. lastly, some tests are added to increase optimizer coverage.
- Loading branch information
1 parent
ddea185
commit 2fddbde
Showing
10 changed files
with
478 additions
and
196 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
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
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
Oops, something went wrong.