[llvm] 404dc7a - [TTI] getExtractWithExtendCost - remove default Index = -1 value

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 07:44:42 PDT 2022


Author: Simon Pilgrim
Date: 2022-09-27T15:44:29+01:00
New Revision: 404dc7af5db59186523eca136f71d87e606016e1

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

LOG: [TTI] getExtractWithExtendCost - remove default Index = -1 value

We currently always specify the index (even if we set it to -1), and a future patch will need to adjust this method to make it more compatible with getScalarizationOverhead

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index 9b8f0a93d46e..e52381abd142 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -1159,10 +1159,10 @@ class TargetTransformInfo {
                    const Instruction *I = nullptr) const;
 
   /// \return The expected cost of a sign- or zero-extended vector extract. Use
-  /// -1 to indicate that there is no information about the index value.
+  /// Index = -1 to indicate that there is no information about the index value.
   InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst,
                                            VectorType *VecTy,
-                                           unsigned Index = -1) const;
+                                           unsigned Index) const;
 
   /// \return The expected cost of control-flow related instructions such as
   /// Phi, Ret, Br, Switch.


        


More information about the llvm-commits mailing list