JIT: Tail-merge process all sets at once#129363
Open
BoyBaykiller wants to merge 7 commits into
Open
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Open
3 tasks
* move return/throw block dedulplication to before tail merge * add partition impl, but don't use it yet
* remove 'already processed' check as its no longer needed
106401d to
534ebff
Compare
Contributor
Author
|
@AndyAyersMS PTAL. The diffs are what I expected, with the exception of the tp regression on x86 - I have no clue why that is and I don't know a good way of finding out. The tiny assembly diffs are only because I also moved return/throw merging to happen before tail-merge and sometimes the |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Say we call
tailMergePreds()with candidates:[A1, B2, C1, A3, B3, B1, A2].Previously, it only processed one set at a time - let's say all the A's.
Then we'd regather all candidates in the caller, skipping the ones which where already processed with checks like
!block->KindIs(BBJ_RETURN, BBJ_THROW) || block->isEmpty()and call it again until it finds no more.With this PR all sets are processed in a single call to
tailMergePreds.It works as follows. We start at index 0 (
A1) find the matches (all the other A's) and make them continous in memory, so we get:[A1, A3, A2, B2, C1, B3, B1]after the first call topartition. We then advance by the number of matches (3) and continue at B2. After the next call topartitionwe get:[A1, A3, A2, B2, B3, B1, C1].I didn't use the STL
std::partiton, as discussed.