[PATCH] D127131: Pipe potentially invalid InstructionCost through CodeMetrics

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 08:20:49 PDT 2022


reames added a comment.

In D127131#3563610 <https://reviews.llvm.org/D127131#3563610>, @reames wrote:

> In D127131#3562661 <https://reviews.llvm.org/D127131#3562661>, @frasercrmck wrote:
>
>> Thanks for the patch, @reames. I agree that invalid costs should never crash. Not just because it allows targets with incomplete models to work but there might always be something that's truly invalid for a target even with a complete model.
>>
>> For testing, would we possibly be able to test scalable vectors on RISC-V without `V` enabled?
>
> Good idea.  I'll add some basic test coverage for the cost model printer itself with that approach.  I don't plan on adding individual tests for each transform pass - mostly because figuring out to trigger each with a small test case seems quite tedious and not particularly worthwhile.

Actually, I wasn't thinking here.  We already have a CostModel test for this, the CodeMetrics layer is one level up and we don't have a dedicated printer pass for that.  Given that, the only options would be a) add a printer pass, or b) exercise through one of the transforms.  The only transform I'd have even a clue how to approach is rotate, so I'll start there.  If that turns out not to be straight forward, I'll come back and ask for permission to land without tests.  :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127131/new/

https://reviews.llvm.org/D127131



More information about the llvm-commits mailing list