-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JIT: introduce redundant branch opt phase #46237
JIT: introduce redundant branch opt phase #46237
Conversation
Move the redundant branch elimination out of assertion prop into its own phase, in anticipation of future enhancements. Run it a bit earlier (before CSE).
This is the same algorithm as before, just run earlier. cc @dotnet/jit-contrib There are diffs. Regressions are typically additional CSEs so hopefully come with a small perf win.
|
@@ -4882,6 +4884,11 @@ void Compiler::compCompile(void** methodCodePtr, ULONG* methodCodeSize, JitFlags | |||
DoPhase(this, PHASE_VN_COPY_PROP, &Compiler::optVnCopyProp); | |||
} | |||
|
|||
if (doBranchOpt) |
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.
Earlier, we would do redundant branch elimination after CSE and now we do it before. Is that the source of diff?
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.
Yes
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.
LGTM, with a question on why we see improvements with this change.
Move the redundant branch elimination out of assertion prop into its
own phase, in anticipation of future enhancements. Run it a bit earlier
(before CSE).