-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start splitting SSA versions at guards
We have so far used a single SSA version to represent both pre-guard data and post-guard data. Initially, guards were only ever inserted after the read of a value, so this wasn't a big problem. However: * Now we insert extra guards during spesh plugin optimization and when doing some speculative call optimizations. There may be read instructions between the initial write and the place that we insert the guard, thus we cannot safely attach the facts the guard asserts to the SSA version as they aren't the case pre-guard. * This in turn leads to duplicate guards being inserted on the same data in various cases, and other missed lowering opportunities. * Inlining may let us prove that a guard on a return value will always be true and thus allow us to eliminate the guard. However, since we don't have a before/after at the guard point, we cannot do that. This commit takes a first step to switching guards to take in one version and produce another version, so we can deal with facts both before and after the guard. The spesh plugin case and speculative call argument case are not yet updated, and so temporarily disabled until they are; other than that, this seems to work well.
- Loading branch information
Showing
10 changed files
with
181 additions
and
125 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
Oops, something went wrong.