-
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
Check if interval interferes with the call #76904
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsAfter building intervals, check if any of them interferes with a call. In other words, scan all the intervals and check if there are refpositions that are created before a call and used after the call. If yes, then update such intervals preference to use I am assuming a TP cost to do this because we will be doing non-linear search, but hopefully, it will be not as bad, and we do get some good results out of it. I do add various checks to skip iteration if we know that scanning it won't make sense.
|
It is significantly worse. Need to think of some better way to handle it. I could probably do something smarter:
I will replace this PR with above strategy. |
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
I took a stab at this today with better handling of call interference and marking |
Replaced by #92744 |
After building intervals, check if any of them interferes with a call. In other words, scan all the intervals and check if there are refpositions that are created before a call and used after the call. If yes, then update such intervals preference to use
callee-save
registers. To accomplish this, I keep track ofLsraLocation
just before addingRefTypeKill
and also record the killmask. After building intervals, go through all the call locations and see if any of the interval collides and if yes, then set itspreferCalleeSave = true
.I am assuming a TP cost to do this because we will be doing non-linear search, but hopefully, it will be not as bad, and we do get some good results out of it. I do add various checks to skip iteration if we know that scanning it won't make sense. We cannot do this at the time of building interval, because we do not have information about the future uses of the interval under consideration.
Related conversation: #75565 (comment)