-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Produce special cased IR for boolean
isinst
checks (#103391)
Currently the IR for boolean `isinst` checks ends up being something like `(x != null ? x.mt == expectedMT ? x : null : null) != null`, which the JIT ends up having a hard time clean up early. With object stack allocation this pattern usually leads to unnecessary address exposure. This adds a simple pattern match during import to produce different IR in the common cases where the `isinst` is just used as a boolean check. We instead produce IR like `(x != null ? x.mt == expectedMT ? 1 : 0 : 0) != 0`, which the JIT has an easier time with.
- Loading branch information
1 parent
cb19811
commit b2ccd98
Showing
2 changed files
with
100 additions
and
16 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