[llvm] [RISCV][TTI] Clarify getRISCVInstructionCost usage and fix MVT for ISD::FP_EXTEND (PR #121556)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 3 23:53:22 PST 2025
https://github.com/arcbbb updated https://github.com/llvm/llvm-project/pull/121556
>From 9402fbb4460206d6b3e75e58d425aedc49f1f0c3 Mon Sep 17 00:00:00 2001
From: ShihPo Hung <shihpo.hung at sifive.com>
Date: Fri, 3 Jan 2025 01:20:43 -0800
Subject: [PATCH] [RISCV][TTI] Use vtype for getRISCVInstructionCost
---
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
index 9b364391f0fa47..3a9073731681ef 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
@@ -48,6 +48,11 @@ class RISCVTTIImpl : public BasicTTIImplBase<RISCVTTIImpl> {
/// 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.
+ /// \param CostKind The type of cost to compute.
InstructionCost getRISCVInstructionCost(ArrayRef<unsigned> OpCodes, MVT VT,
TTI::TargetCostKind CostKind);
More information about the llvm-commits
mailing list