Commit 8117ba1
committed
[VPlan] Return Max from computeCost without underlying instrs.
Update computeCost to return InstructionCost::getMax() for recipes
without underlying instructions. Max is used as a sentinel value to
handle cases where there is no underlying instruction. At the moment we
need to catch those cases when -force-target-instruction-cost is passed
to avoid applying the forced cost to auxiliary recipes (like scalar
steps). This is needed to match the legacy behavior.
Unfortunately we cannot use InstructionCost::getInvalid, as this is used
to indicate that an instruction cannot be legalized (e.g. for scalable
vectors).
Alternatively computeCost could return an optional cost.1 parent 6e6d5ea commit 8117ba1
2 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | | - | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
848 | 850 | | |
849 | 851 | | |
850 | 852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | 279 | | |
288 | 280 | | |
289 | 281 | | |
| |||
293 | 285 | | |
294 | 286 | | |
295 | 287 | | |
296 | | - | |
297 | | - | |
| 288 | + | |
| 289 | + | |
298 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
299 | 295 | | |
300 | 296 | | |
301 | 297 | | |
| |||
315 | 311 | | |
316 | 312 | | |
317 | 313 | | |
318 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
319 | 317 | | |
320 | 318 | | |
321 | 319 | | |
| |||
0 commit comments