diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h index 9b364391f0fa4..042530b9cd2b3 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -48,6 +48,14 @@ class RISCVTTIImpl : public BasicTTIImplBase { /// actual target hardware. unsigned getEstimatedVLFor(VectorType *Ty); + /// This function calculates the costs for one or more RVV opcodes based + /// on the vtype and the cost kind. + /// \param Opcodes A list of opcodes of the RVV instruction to evaluate. + /// \param VT The MVT of vtype associated with the RVV instructions. + /// For widening/narrowing instructions where the result and source types + /// differ, it is important to check the spec to determine whether the vtype + /// refers to the result or source type. + /// \param CostKind The type of cost to compute. InstructionCost getRISCVInstructionCost(ArrayRef OpCodes, MVT VT, TTI::TargetCostKind CostKind);