-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: use lineno for scheduler tiebreaking #14577
Comments
Sounds fine. I just talked to David about redoing some scheduler priorities to reduce register pressure. Both might be doable as part of a rewrite. |
Slightly related, regalloc was one place I was going to look at when I got some time in order to try to speed up compilation speed. It shows up often as the longest running and most allocating pass. Top 10 longest running passes for make.bash:
Most Allocs:
Most Bytes Alloced:
|
We could also use this to break ties for block-ordering -- it doesn't do squat for performance, but it makes wading through the asm slightly easier. |
CL https://golang.org/cl/20240 mentions this issue. |
The dev.ssa scheduler adds values with the same priority and use count in whatever order they previously occurred. I suggest that we take lineno into account as a third tier sorting parameter. The goal would be to find the value with the lineno closest to the most recently scheduled value. This will do two things. (1) Make debugging nicer by having instructions better follow the original code. (2) Reduce value deltas in the pcln table, possibly making it smaller.
Opinions?
cc @randall77 @derekparker @crawshaw @tzneal
The text was updated successfully, but these errors were encountered: