[llvm] eaa539a - [LV][NFC] Modify code comments

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 21:34:54 PDT 2022


Author: liqinweng
Date: 2022-08-23T12:21:53+08:00
New Revision: eaa539afa16ef4968e545d0d74d769cdd04646f5

URL: https://github.com/llvm/llvm-project/commit/eaa539afa16ef4968e545d0d74d769cdd04646f5
DIFF: https://github.com/llvm/llvm-project/commit/eaa539afa16ef4968e545d0d74d769cdd04646f5.diff

LOG: [LV][NFC] Modify code comments

Reviewed By: jacquesguan

Differential Revision: https://reviews.llvm.org/D132093

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/TargetTransformInfo.h
    llvm/include/llvm/CodeGen/BasicTTIImpl.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index e31612570135..454bd573d42a 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -1291,7 +1291,7 @@ class TargetTransformInfo {
   /// Calculate the cost of an extended reduction pattern, similar to
   /// getArithmeticReductionCost of a reduction with an extension.
   /// This is the cost of as:
-  /// ResTy vecreduce(ext(Ty A)).
+  /// ResTy vecreduce.opcode(ext(Ty A)).
   InstructionCost getExtendedReductionCost(
       unsigned Opcode, bool IsUnsigned, Type *ResTy, VectorType *Ty,
       Optional<FastMathFlags> FMF,

diff  --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
index 1ef16a46f412..651c9ad52788 100644
--- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -2350,7 +2350,7 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
                                            Optional<FastMathFlags> FMF,
                                            TTI::TargetCostKind CostKind) {
     // Without any native support, this is equivalent to the cost of
-    // vecreduce.op(ext).
+    // vecreduce.opcode(ext(Ty A)).
     VectorType *ExtTy = VectorType::get(ResTy, Ty);
     InstructionCost RedCost =
         thisT()->getArithmeticReductionCost(Opcode, ExtTy, FMF, CostKind);
@@ -2365,7 +2365,8 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
                                          VectorType *Ty,
                                          TTI::TargetCostKind CostKind) {
     // Without any native support, this is equivalent to the cost of
-    // vecreduce.add(mul(ext, ext)).
+    // vecreduce.add(mul(ext(Ty A), ext(Ty B))) or
+    // vecreduce.add(mul(A, B)).
     VectorType *ExtTy = VectorType::get(ResTy, Ty);
     InstructionCost RedCost = thisT()->getArithmeticReductionCost(
         Instruction::Add, ExtTy, None, CostKind);


        


More information about the llvm-commits mailing list