Reset assignedInterval during verifyFinalAllocation #49286
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My latest changes to EH Var for single defs exposed 2 more issues where we were not resetting the
assignedInterval
of a assigned reg:RefTypeDef
, if an interval doesn't get assigned to a new register, then reset theassignedInterval
of theregRecord
that is currently assigned to that interval.RefTypeDef
, if an interval got assigned to a different register than the originalassignReg
of that interval and if that refposition is spilled immediately, then reset theassignedInterval
of suchregRecord
.Both of the above scenarios were exposed because they were EH Vars. In
verifyFinalAllocation()
, there are multiple places where we check forRefTypeDef
and take action and I looked into consolidating all the logic at single place, but I was not sure if it will regress in the way we print the "Final allocation table". Hence, to honor the time, I went ahead and did the spot fixing of these 2 scenarios, but in future, will try to refactor various scenarios.Fixes errors: