JIT: Remove BBJ_ALWAYS fall-through check in Compiler::fgFindInsertPoint #96070
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #95998. This reverts the behavior of
Compiler::fgFindInsertPoint
to how it was before BBJ_NONE was removed. In order to remove theBBF_NONE_QUIRK
check, I initially tried to adaptfgFindInsertPoint
to not insert new blocks afterBBJ_ALWAYS
blocks that jump to the next block (i.e. mimickingBBJ_NONE
behavior), butfgFindInsertPoint
is called in numerous phases (importation, block reordering, etc.) where block layout is not finalized, so it might be premature to try to keepBBJ_ALWAYS
blocks contiguous with their jump targets. I'd like to try our previous approach of checking only for implicit fall-through instead. This produced dramatic diffs on win-x64 locally; every collection was still a significant net size improvement, and most regressions are due to changes in block ordering resulting in more/longer jumps. In one method, this change enabled the JIT to do more loop cloning, resulting in massive size increases. I'm opening this now for visibility, and will update with explanations of example diffs.