-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't run optJumpThreading when fgCurBBEpochSize != (fgBBNumMax + 1) #72440
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
So the problem that
It seems to me that we can't just re-calculate doms and renumber blocks in-between loopHoist and optRedundantBranch phases (due to SSA state?) so this fix works but it has some diffs. What do you think @AndyAyersMS @BruceForstall runtime/src/coreclr/jit/compiler.cpp Lines 4948 to 4965 in 215d7e4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an appropriate fix for now.
We really need to start eagerly creating preheaders, so hoisting can stop modifying the flow graph.
// We added new blocks since the last renumerate e.g. in optLoopHoist | ||
break; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this check down at the start of optJumpThread
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optJumpThread
doesn't really depend on the epoch, it depends onBlockSet
which depends on the epoch.
Down the road we should consider giving optJumpThread
alternative ways of keeping track of the different sets of preds, I only used BlockSet
here because it seemed convenient. The pred sets are likely going to be pretty small (most blocks don't have many preds) so something simpler might actually both remove this dependency and be more efficient overall.
I'll add a note to #48115.
Failure is #72429 |
Fixes #71599