Skip to content
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: enable one particular flow opt when we have PGO #84875

Merged
merged 1 commit into from
Apr 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions src/coreclr/jit/fgopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2776,15 +2776,6 @@ bool Compiler::fgOptimizeBranchToEmptyUnconditional(BasicBlock* block, BasicBloc
optimizeJump = true;
}

// If we are optimizing using real profile weights
// then don't optimize a conditional jump to an unconditional jump
// until after we have computed the edge weights
//
if (fgIsUsingProfileWeights() && !fgEdgeWeightsComputed)
{
optimizeJump = false;
}

if (optimizeJump)
{
#ifdef DEBUG
Expand Down Expand Up @@ -3156,15 +3147,6 @@ bool Compiler::fgOptimizeSwitchBranches(BasicBlock* block)
optimizeJump = false;
}

// If we are optimize using real profile weights
// then don't optimize a switch jump to an unconditional jump
// until after we have computed the edge weights
//
if (fgIsUsingProfileWeights() && !fgEdgeWeightsComputed)
{
optimizeJump = false;
}

if (optimizeJump)
{
bNewDest = bDest->bbJumpDest;
Expand Down