@@ -1766,24 +1766,13 @@ class TargetTransformInfo {
17661766 unsigned ChainSizeInBytes,
17671767 VectorType *VecTy) const ;
17681768
1769- // / Flags describing the kind of vector reduction.
1770- struct ReductionFlags {
1771- ReductionFlags () = default ;
1772- bool IsMaxOp =
1773- false ; // /< If the op a min/max kind, true if it's a max operation.
1774- bool IsSigned = false ; // /< Whether the operation is a signed int reduction.
1775- bool NoNaN =
1776- false ; // /< If op is an fp min/max, whether NaNs may be present.
1777- };
1778-
17791769 // / \returns True if the targets prefers fixed width vectorization if the
17801770 // / loop vectorizer's cost-model assigns an equal cost to the fixed and
17811771 // / scalable version of the vectorized loop.
17821772 bool preferFixedOverScalableIfEqualCost () const ;
17831773
17841774 // / \returns True if the target prefers reductions in loop.
1785- bool preferInLoopReduction (unsigned Opcode, Type *Ty,
1786- ReductionFlags Flags) const ;
1775+ bool preferInLoopReduction (unsigned Opcode, Type *Ty) const ;
17871776
17881777 // / \returns True if the target prefers reductions select kept in the loop
17891778 // / when tail folding. i.e.
@@ -1796,8 +1785,7 @@ class TargetTransformInfo {
17961785 // / As opposed to the normal scheme of p = phi (0, a) which allows the select
17971786 // / to be pulled out of the loop. If the select(.., add, ..) can be predicated
17981787 // / by the target, this can lead to cleaner code generation.
1799- bool preferPredicatedReductionSelect (unsigned Opcode, Type *Ty,
1800- ReductionFlags Flags) const ;
1788+ bool preferPredicatedReductionSelect (unsigned Opcode, Type *Ty) const ;
18011789
18021790 // / Return true if the loop vectorizer should consider vectorizing an
18031791 // / otherwise scalar epilogue loop.
@@ -2334,10 +2322,9 @@ class TargetTransformInfo::Concept {
23342322 unsigned ChainSizeInBytes,
23352323 VectorType *VecTy) const = 0;
23362324 virtual bool preferFixedOverScalableIfEqualCost () const = 0;
2337- virtual bool preferInLoopReduction (unsigned Opcode, Type *Ty,
2338- ReductionFlags) const = 0;
2339- virtual bool preferPredicatedReductionSelect (unsigned Opcode, Type *Ty,
2340- ReductionFlags) const = 0;
2325+ virtual bool preferInLoopReduction (unsigned Opcode, Type *Ty) const = 0;
2326+ virtual bool preferPredicatedReductionSelect (unsigned Opcode,
2327+ Type *Ty) const = 0;
23412328 virtual bool preferEpilogueVectorization () const = 0;
23422329
23432330 virtual bool shouldExpandReduction (const IntrinsicInst *II) const = 0;
@@ -3145,13 +3132,12 @@ class TargetTransformInfo::Model final : public TargetTransformInfo::Concept {
31453132 bool preferFixedOverScalableIfEqualCost () const override {
31463133 return Impl.preferFixedOverScalableIfEqualCost ();
31473134 }
3148- bool preferInLoopReduction (unsigned Opcode, Type *Ty,
3149- ReductionFlags Flags) const override {
3150- return Impl.preferInLoopReduction (Opcode, Ty, Flags);
3135+ bool preferInLoopReduction (unsigned Opcode, Type *Ty) const override {
3136+ return Impl.preferInLoopReduction (Opcode, Ty);
31513137 }
3152- bool preferPredicatedReductionSelect (unsigned Opcode, Type *Ty,
3153- ReductionFlags Flags ) const override {
3154- return Impl.preferPredicatedReductionSelect (Opcode, Ty, Flags );
3138+ bool preferPredicatedReductionSelect (unsigned Opcode,
3139+ Type *Ty ) const override {
3140+ return Impl.preferPredicatedReductionSelect (Opcode, Ty);
31553141 }
31563142 bool preferEpilogueVectorization () const override {
31573143 return Impl.preferEpilogueVectorization ();
0 commit comments