-
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: Simplify block insertion logic during loop compaction #107403
JIT: Simplify block insertion logic during loop compaction #107403
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Small diffs as expected; odd that TP didn't improve. I'm guessing we don't need to compact loops all that often, so pre-computing |
cc @dotnet/jit-contrib, @AndyAyersMS PTAL. Thanks! |
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.
Ultimately, we should not need to compact loops at all.
But that may be too radical a change to make right now.
Yeah, once we replace |
Which reminds me -- I wonder if we should switch the layout RPO over to something like the "loop aware" RPO-inspired ordering that is now used in VN? The main distinction being that that RPO may intermingle non-loop blocks with loop blocks, whereas the loop aware ordering takes care to visit all loop blocks before any blocks that may follow. |
There's not yet a convenient abstraction for this order but it would not be too hard to make one that VN and something else could share. |
Interesting, I wasn't aware of this functionality. I'll take a look at it next. It would be nice if this could render |
Similar to #107371, don't worry about breaking up fallthrough when moving non-loop blocks out of loop bodies. We can rely on block layout to restore any fallthrough behavior worth keeping.
I expect this will incur diffs from
optSetBlockWeights
, since it still relies on the lexical ordering of blocks.