Commit fcfde33
committed
[VPlan] Move predication to VPlanTransform (NFC) (WIP).
This patch moves the logic to predicate and linearize a VPlan to a
dedicated VPlan transform.
The main logic to perform predication is ready to review, although
there are few things to note that should be improved, either directly in
the PR or in the future:
* Edge and block masks are cached in VPRecipeBuilder, so they can be
accessed during recipe construction. A better alternative may be to
add mask operands to all VPInstructions that need them and use that
during recipe construction
* The mask caching in a map also means that this map needs updating
each time a new recipe replaces a VPInstruction; this would also be
handled by adding mask operands.
Currently this is still WIP due to early-exit loop handling not working
due to the exit conditions not being available in the initial VPlans.
This will be fixed with #128419
and follow-ups
All tests except early-exit loops are passing1 parent 923ea72 commit fcfde33
File tree
7 files changed
+379
-328
lines changed- llvm
- lib/Transforms/Vectorize
- unittests/Transforms/Vectorize
7 files changed
+379
-328
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 71 | + | |
80 | 72 | | |
81 | 73 | | |
82 | 74 | | |
| |||
118 | 110 | | |
119 | 111 | | |
120 | 112 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 113 | | |
127 | 114 | | |
128 | 115 | | |
| |||
160 | 147 | | |
161 | 148 | | |
162 | 149 | | |
| 150 | + | |
163 | 151 | | |
164 | 152 | | |
165 | | - | |
| 153 | + | |
| 154 | + | |
166 | 155 | | |
167 | 156 | | |
168 | 157 | | |
| |||
193 | 182 | | |
194 | 183 | | |
195 | 184 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 185 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
217 | 189 | | |
218 | 190 | | |
219 | 191 | | |
| |||
238 | 210 | | |
239 | 211 | | |
240 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
241 | 220 | | |
242 | 221 | | |
243 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
242 | 241 | | |
243 | 242 | | |
244 | 243 | | |
245 | | - | |
246 | | - | |
| 244 | + | |
247 | 245 | | |
248 | 246 | | |
249 | 247 | | |
| |||
334 | 332 | | |
335 | 333 | | |
336 | 334 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | 335 | | |
341 | 336 | | |
342 | 337 | | |
343 | 338 | | |
344 | | - | |
345 | | - | |
346 | | - | |
| 339 | + | |
| 340 | + | |
347 | 341 | | |
348 | | - | |
| 342 | + | |
349 | 343 | | |
350 | 344 | | |
351 | 345 | | |
| |||
0 commit comments