[PATCH] D127131: Pipe potentially invalid InstructionCost through CodeMetrics

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 01:07:13 PDT 2022


frasercrmck added a comment.

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?



================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:678
+  // FIXME: This will crash for illegal InstructionCost, we should update the
+  // callers to gracerfully bailout in this case.
+  unsigned LoopSize = *Metrics.NumInsts.getValue();
----------------
`gracefully`


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