Commit cd40070
authored
[RegisterPressure] NFC: Clean up RP handling for instructions with overlapping Def/Use (#109875)
The current RP handling for uses of an MI that overlap with defs is
confusing and unnecessary. Moreover, the lane masks do not accurately
model the liveness behavior of the subregs. This cleans things up a bit
and more accurately models subreg lane liveness by sinking the use
handling into subsent Uses loop.
The effect of this PR is to replace
A. `increaseRegPressure(Reg, LiveAfter, ~LiveAfter & LiveBefore)`
with
B. `increaseRegPressure(Reg, LiveAfter, LiveBefore)`
Note that A (Defs loop) and B (Uses loop) have different definitions of
LiveBefore
A. `LiveBefore = (LiveAfter & ~DefLanes) | UseLanes`
and
B. `LiveBefore = LiveAfter | UseLanes`
Also note, `increaseRegPressure` will exit if `PrevMask` (`LiveAfter`
for both A/B) has any active lanes, thus these calls will only have an
effect if `LiveAfter` is 0.
A. NewMask = ~LiveAfter & ((LiveAfter & ~DefLanes) | UseLanes) => (1 &
UseLanes) => UseLanes = (0 | UseLanes) => (LiveAfter | UseLanes) =
NewMask B.1 parent 55c70f6 commit cd40070
1 file changed
+2
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | | - | |
1064 | | - | |
| 1063 | + | |
1065 | 1064 | | |
1066 | | - | |
1067 | 1065 | | |
1068 | | - | |
| 1066 | + | |
1069 | 1067 | | |
1070 | 1068 | | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | 1069 | | |
1076 | 1070 | | |
1077 | 1071 | | |
| |||
0 commit comments