[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 14:37:18 PST 2025


================
@@ -1468,6 +1468,15 @@ class TargetTransformInfo {
                                      TTI::TargetCostKind CostKind,
                                      unsigned Index = -1) const;
 
+  /// \return The expected of aggregate inserts and extracts. Use an empty
+  /// ArrayRef to indicate that there is no information on the indices. This is
+  /// used when the instruction is not available; a typical use case is to
+  /// provision the cost of vectorization/scalarization in vectorizer passes.
+  InstructionCost getInsertExtractValueCost(unsigned Opcode, Type *AggType,
----------------
fhahn wrote:

Thanks. Not sure what others think, but IMO it would probably be better to drop the extra arguments, instead of passing them without being used. They can always be added once they are needed.

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


More information about the llvm-commits mailing list