Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate branchless IL for
(b ? 1 : 0)
(#67191)
* Add tests * Generate branchless IL for `(b ? 1 : 0)` * Update IL snapshots * Move BuildValidator to 64 bit This process uses a significant amount of memory as it's essentially doing compilation. Like the compiler server it needs to be 64 bit on 64 platforms to safely host all the items. Moved to explicit PlatformTarget of AnyCPU so it's not silently run as x86 in Debug. * Rename `isOne` out parameter * Add nonbinary test * Restrict the optimization To only comparison operations. Also always convert to bool. * Test IL in Debug * Encapsulate the emit into method * Convert result * Disable optimization in Debug * Improve wording * Check type * Rename emit comparison method * Clarify test options * Extend tests * Revert "Move BuildValidator to 64 bit" This reverts commit 333d1aa. * Optimize `char`s * Remove unnecessary `char` check * Extend `char` tests * Add VB tests * Emit branchless IL for `If(b, 1, 0)` in VB * Update IL snapshot * Add sequence points to IL snapshots * Test `isinst` * Optimize `isinst` * Optimize `is` codegen when used inside condition * Rename parameter which omits boolean conversion of `is` codegen * Clarify return values * Improve variable naming * Test IntPtr in VB * Test `ILEmitStyle.DebugFriendlyRelease` --------- Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
- Loading branch information
Showing
9 changed files
with
1,833 additions
and
488 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
Oops, something went wrong.