[llvm] [RISCV][CostModel][NFC] Add getRISCVInstructionCost() to TTI for Cost… (PR #73651)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 14:06:20 PST 2023


================
@@ -34,6 +34,63 @@ static cl::opt<unsigned> SLPMaxVF(
         "exclusively by SLP vectorizer."),
     cl::Hidden);
 
+InstructionCost
+RISCVTTIImpl::getRISCVInstructionCost(ArrayRef<unsigned> OpCodes, MVT VT,
+                                      TTI::TargetCostKind CostKind) {
+  size_t NumInstr = OpCodes.size();
+  if (CostKind == TTI::TCK_CodeSize)
----------------
topperc wrote:

I assume we've now changed the behavior of CostKind==TTI::TCK_CodeSize by removing all the getLMULCost calls? Can we test that?

https://github.com/llvm/llvm-project/pull/73651


More information about the llvm-commits mailing list