Commit b55af4e
committed
[AMDGPU][Next Use Analysis] Use inside the loop NUD penalty. Bugfixing and refactoring.
Implemented NUD penalty for uses inside the loop body. If register used in a loop is selected for spill,
it will be reloaded in loop pre-header. NUDs for those reg/mask are cut on the pre-header-header edge.
This makes NUDs shorter and reg/mask less attractive as a spill candidate.
1. Fixed incorrect logic in insert/merge - coverage instead of exact mask match.
2. Fixed full register use before sub-reg use precedence.
Refactoring: insert incorporates coverage and full over subreg precedence logic, merge uses insert.1 parent 75a02b4 commit b55af4e
File tree
20 files changed
+10552
-12213
lines changed- llvm
- lib/Target/AMDGPU
- test/CodeGen/AMDGPU/NextUseAnalysis
- unittests/Target/AMDGPU
20 files changed
+10552
-12213
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
127 | 132 | | |
| 133 | + | |
128 | 134 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
93 | 114 | | |
94 | 115 | | |
95 | 116 | | |
| |||
103 | 124 | | |
104 | 125 | | |
105 | 126 | | |
106 | | - | |
107 | | - | |
| 127 | + | |
| 128 | + | |
108 | 129 | | |
109 | 130 | | |
110 | 131 | | |
| |||
113 | 134 | | |
114 | 135 | | |
115 | 136 | | |
116 | | - | |
117 | | - | |
| 137 | + | |
| 138 | + | |
118 | 139 | | |
119 | 140 | | |
120 | 141 | | |
| |||
186 | 207 | | |
187 | 208 | | |
188 | 209 | | |
189 | | - | |
| 210 | + | |
190 | 211 | | |
191 | 212 | | |
192 | 213 | | |
193 | 214 | | |
194 | 215 | | |
195 | | - | |
196 | 216 | | |
197 | 217 | | |
198 | | - | |
199 | 218 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 219 | + | |
| 220 | + | |
214 | 221 | | |
215 | 222 | | |
216 | 223 | | |
| |||
0 commit comments