Per the documentation in Support/InstructionCost.h, the purpose of an invalid cost is so that clients can change behavior on impossible to cost inputs. CodeMetrics was instead asserting that invalid costs never occurred. On a target with an incomplete cost model - e.g. RISCV - this means that transformations would crash on (falsely) invalid constructs - e.g. scalable vectors. While we certainly should improve the cost model - and I plan to do so in the near future - we also shouldn't be crashing. This violates the explicitly stated purpose of an invalid InstructionCost. I updated all of the "easy" consumers where bailouts were locally obvious. I plan to follow up with loop unroll in a following change. Differential Revision: https://reviews.llvm.org/D127131 |
||
|---|---|---|
| .. | ||
| RISCV | ||
| 2009-01-25-SingleEntryPhi.ll | ||
| PhiRename-1.ll | ||
| PhiSelfReference-1.ll | ||
| alloca.ll | ||
| basic.ll | ||
| call-prepare-for-lto.ll | ||
| callbr.ll | ||
| catchret.ll | ||
| convergent.ll | ||
| crash.ll | ||
| dbg-value-duplicates-2.ll | ||
| dbg-value-duplicates.ll | ||
| dbgvalue.ll | ||
| freeze-crash.ll | ||
| indirectbr.ll | ||
| loopexitinglatch.ll | ||
| multiple-deopt-exits.ll | ||
| multiple-exits.ll | ||
| noalias.ll | ||
| nosimplifylatch.ll | ||
| oz-disable.ll | ||
| phi-dbgvalue.ll | ||
| phi-duplicate.ll | ||
| pr2639.ll | ||
| pr22337.ll | ||
| pr33701.ll | ||
| pr35210.ll | ||
| pr37205.ll | ||
| pr51981-scev-problem.ll | ||
| preserve-loop-simplify.ll | ||
| preserve-mssa.ll | ||
| preserve-scev.ll | ||
| simplifylatch.ll | ||
| switch.ll | ||
| vect.omp.persistence.ll | ||