Skip to content

Commit 3735b0b

Browse files
committed
Rebase and update comments
1 parent 8277288 commit 3735b0b

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

llvm/include/llvm/Analysis/TargetTransformInfo.h

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,19 +1383,17 @@ class TargetTransformInfo {
13831383

13841384
/// \return The cost of a shuffle instruction of kind Kind with inputs of type
13851385
/// SrcTy, producing a vector of type DstTy. The exact mask may be passed as
1386-
/// Mask, or else the array will be empty. The index and subtype parameters
1387-
/// are used by the subvector insertion and extraction shuffle kinds to show
1388-
/// the insert/extract point and the type of the subvector being
1389-
/// inserted/extracted. The operands of the shuffle can be passed through \p
1390-
/// Args, which helps improve the cost estimation in some cases, like in
1391-
/// broadcast loads.
1392-
LLVM_ABI InstructionCost
1393-
getShuffleCost(ShuffleKind Kind, VectorType *DstTy, VectorType *SrcTy,
1394-
ArrayRef<int> Mask = {},
1395-
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput,
1396-
int Index = 0, VectorType *SubTp = nullptr,
1397-
ArrayRef<const Value *> Args = {},
1398-
const Instruction *CxtI = nullptr) const;
1386+
/// Mask, or else the array will be empty. The Index and SubTp parameters
1387+
/// are used by the subvector insertions shuffle kinds to show the insert
1388+
/// point and the type of the subvector being inserted. The operands of the
1389+
/// shuffle can be passed through \p Args, which helps improve the cost
1390+
/// estimation in some cases, like in broadcast loads.
1391+
LLVM_ABI InstructionCost getShuffleCost(
1392+
ShuffleKind Kind, VectorType *DstTy, VectorType *SrcTy,
1393+
ArrayRef<int> Mask = {},
1394+
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput, int Index = 0,
1395+
VectorType *SubTp = nullptr, ArrayRef<const Value *> Args = {},
1396+
const Instruction *CxtI = nullptr) const;
13991397

14001398
/// Represents a hint about the context in which a cast is used.
14011399
///

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5538,7 +5538,8 @@ AArch64TTIImpl::getShuffleCost(TTI::ShuffleKind Kind, VectorType *DstTy,
55385538
NumSources <= 2
55395539
? getShuffleCost(NumSources <= 1 ? TTI::SK_PermuteSingleSrc
55405540
: TTI::SK_PermuteTwoSrc,
5541-
NTp, NTp, NMask, CostKind, 0, nullptr, Args, CxtI)
5541+
NTp, NTp, NMask, CostKind, 0, nullptr, Args,
5542+
CxtI)
55425543
: LTNumElts;
55435544
Result.first->second = NCost;
55445545
Cost += NCost;

0 commit comments

Comments
 (0)