-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Frontend: short-circuit code generation on invalid instructions with …
…multiblock A source of overhead with multiblock is hitting instructions through a conditional branch that can never be executed. Usually AVX512 instructions in glibc. This causes us to emit partial blocks for a ton of targets that will never get executed. Instead, when we have multiblock enabled, if a block hits an instruction encoding we don't support, then remove all the decoded instructions from the block and early terminate it if it isn't the entry block. This resolves the issue of emitting a bunch of IR and code for blocks never executed. If the block of code has an invalid instruction in the entry block for decoding then it'll still emit code up to the invalid instruction and raise a SIGILL. This has the potential for generating some additional blocks of code if a game is abusing SIGILL, but since that's unlikely it's a good trade-off. Also removes a few log instructions that don't really provide anything anymore and just show up as confusing messages when multiblock is enabled.
- Loading branch information
1 parent
2829ad5
commit c82a683
Showing
3 changed files
with
34 additions
and
8 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