Uh oh!
There was an error while loading. Please reload this page.
JIT: Tail-merge robust crossJumpVictim selection - #129141
Conversation
crossJumpVictimcrossJumpVictimcrossJumpVictimcrossJumpVictim selection4ef215d to
cba2e61Compare* don't early out * make NoGcPoll preference explicit
aa70303 to
a9d4d53Compare@AndyAyersMS PTAL. Makes the There are some few good diffs from avoiding splitting of from |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AndyAyersMS
left a comment
There was a problem hiding this comment.
LGTM
@EgorBo can you also review
| bool const isNoSplit = stmt == predBlock->firstStmt(); | ||
| bool const isFallThrough = (predBlock->KindIs(BBJ_ALWAYS) && predBlock->JumpsToNext()); | ||
| auto getRank = [=]() -> unsigned { |
There was a problem hiding this comment.
not sure I understand why you wrapped it to a single-use lambda, not a big fan of this approach.
Uh oh!
There was an error while loading. Please reload this page.
Previously, `crossJumpVictim` selection logic was dependent on the order of candidates which can lead to random diffs. I removed the early out and added a tie-break which makes it order independent and sets the stage for a follow up zero-diff PR that processes all sets at once. For the tie-break I used: `predBlock->bbNum < crossJumpVictim->bbNum`. This actually has few good diffs because it preferences away from `BBF_NEEDS_GCPOLL` blocks for some reason. I'd be nice to add that as a seperate heuristic instead of being implicitly encoded in the tie-break.
Previously,
crossJumpVictimselection logic was dependent on the order of candidates which can lead to random diffs.I removed the early out and added a tie-break which makes it order independent and sets the stage for a follow up zero-diff PR that processes all sets at once.
For the tie-break I used:
predBlock->bbNum < crossJumpVictim->bbNum. This actually has few good diffs because it preferences away fromBBF_NEEDS_GCPOLLblocks for some reason. I'd be nice to add that as a seperate heuristic instead of being implicitly encoded in the tie-break.