Skip to content

Conversation

@amanasifkhalid
Copy link
Contributor

Part of #107749. Now that we have a utility for computing loop-aware RPO traversals, use it for getting the initial block layout. This isn't enough on its own to get rid of fgMoveHotJumps completely (churn is quite big if I try to remove that method), but having a better initial layout should help decrease the search space a bit once we replace fgMoveHotJumps with 3-opt.

cc @dotnet/jit-contrib

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 15, 2024
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@amanasifkhalid
Copy link
Contributor Author

@AndyAyersMS PTAL. Diffs (surprisingly?) show net PerfScore regressions. I suspect this is from cases where we previously were breaking up the loop body to create quick exit paths (i.e. when returning early in a loop). In such cases, we're taking a PerfScore penalty by breaking up fallthrough for conditional "exit early or continue" jumps in loops, but we're improving the locality of the loop body, which isn't modeled by PerfScore. Perhaps we should leave cases where we're justified in breaking up loops to 3-opt?

@AndyAyersMS
Copy link
Member

@AndyAyersMS PTAL. Diffs (surprisingly?) show net PerfScore regressions. I suspect this is from cases where we previously were breaking up the loop body to create quick exit paths (i.e. when returning early in a loop). In such cases, we're taking a PerfScore penalty by breaking up fallthrough for conditional "exit early or continue" jumps in loops, but we're improving the locality of the loop body, which isn't modeled by PerfScore. Perhaps we should leave cases where we're justified in breaking up loops to 3-opt?

Yes, I'd say deciding to break up loop bodies is a "global" decision that is better left to 3-opt.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants