-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve EH dead code elimination (#93428)
* Improve EH dead code elimination Update `fgRemoveDeadBlocks()` to only treat EH handlers as reachable if their corresponding `try` block entry is reachable. This causes more dead code to be eliminated in handlers that are not reachable. There is a little more work to do to completely clean these up: 1. If a `try` is not reachable, we should get rid of its entire EH table entry. Currently, its block is generated as `int3` (on xarch). 2. Even though the handler is not reachable, we still generate the prolog followed by `int3` for the body. Contributes to #82335 * Fix BBJ_EHFILTERRET handling in fgRemoveBlockAsPred fgRemoveBlockAsPred had special handling to not decrease the bbRefs count of the filter-handler targeted by BBJ_EHFILTERRET. This is incorrect, as the filter-handler already has an extra "beginning of handler" extra ref count. Possibly this code was never invoked before as filters were not previously removed. Also, fix the JitDump output of the filter ret block in block dumps. * Put back arm32 BBJ_CALLFINALLY/BBJ_ALWAYS pair check
- Loading branch information
1 parent
92907e2
commit d7c8198
Showing
6 changed files
with
58 additions
and
41 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