|
LLVM 24.0.0git
|
The group of interleaved loads/stores sharing the same stride and close to each other. More...
#include "llvm/Analysis/VectorUtils.h"
Public Member Functions | |
| InterleaveGroup (uint32_t Factor, bool Reverse, Align Alignment) | |
| InterleaveGroup (InstTy *Instr, int32_t Stride, Align Alignment) | |
| bool | isReverse () const |
| uint32_t | getFactor () const |
| Align | getAlign () const |
| uint32_t | getNumMembers () const |
| bool | insertMember (InstTy *Instr, int32_t Index, Align NewAlign) |
Try to insert a new member Instr with index Index and alignment NewAlign. | |
| InstTy * | getMember (uint32_t Index) const |
Get the member with the given index Index. | |
| auto | members () const |
| Return an iterator range over the non-null members of this group, in index order. | |
| uint32_t | getIndex (const InstTy *Instr) const |
| Get the index for the given member. | |
| InstTy * | getInsertPos () const |
| void | setInsertPos (InstTy *Inst) |
| void | addMetadata (InstTy *NewInst) const |
| Add metadata (e.g. | |
| bool | requiresScalarEpilogue () const |
| Returns true if this Group requires a scalar iteration to handle gaps. | |
| bool | isFull () const |
| Return true if this group is full, i.e. it has no gaps. | |
| void | addMetadata (Instruction *NewInst) const |
The group of interleaved loads/stores sharing the same stride and close to each other.
Each member in this group has an index starting from 0, and the largest index should be less than interleaved factor, which is equal to the absolute value of the access's stride.
E.g. An interleaved load group of factor 4: for (unsigned i = 0; i < 1024; i+=4) { a = A[i]; // Member of index 0 b = A[i+1]; // Member of index 1 d = A[i+3]; // Member of index 3 ... }
An interleaved store group of factor 4: for (unsigned i = 0; i < 1024; i+=4) { ... A[i] = a; // Member of index 0 A[i+1] = b; // Member of index 1 A[i+2] = c; // Member of index 2 A[i+3] = d; // Member of index 3 }
Note: the interleaved load group could have gaps (missing members), but the interleaved store group doesn't allow gaps.
Definition at line 540 of file VectorUtils.h.
|
inline |
Definition at line 542 of file VectorUtils.h.
|
inline |
Definition at line 546 of file VectorUtils.h.
References assert().
| void llvm::InterleaveGroup< Instruction >::addMetadata | ( | Instruction * | NewInst | ) | const |
Definition at line 1761 of file VectorUtils.cpp.
| void InterleaveGroup::addMetadata | ( | InstTy * | NewInst | ) | const |
Add metadata (e.g.
alias info) from the instructions in this group to NewInst.
FIXME: this function currently does not add noalias metadata a'la addNewMedata. To do that we need to compute the intersection of the noalias info from all members.
Definition at line 1755 of file VectorUtils.cpp.
References llvm_unreachable.
Referenced by llvm::VPInterleaveEVLRecipe::execute(), and llvm::VPInterleaveRecipe::execute().
|
inline |
Definition at line 557 of file VectorUtils.h.
Referenced by llvm::VPInterleaveEVLRecipe::execute(), and llvm::VPInterleaveRecipe::execute().
|
inline |
Definition at line 556 of file VectorUtils.h.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::createBitMaskForGaps(), llvm::VPInterleaveEVLRecipe::execute(), llvm::VPInterleaveRecipe::execute(), isFull(), and requiresScalarEpilogue().
|
inline |
Get the index for the given member.
Unlike the key in the member map, the index starts from 0.
Definition at line 621 of file VectorUtils.h.
References I, and llvm_unreachable.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving().
|
inline |
Definition at line 630 of file VectorUtils.h.
Referenced by llvm::VPInterleaveEVLRecipe::execute(), llvm::VPInterleaveRecipe::execute(), and llvm::LoopVectorizationCostModel::setWideningDecision().
|
inline |
Get the member with the given index Index.
Definition at line 605 of file VectorUtils.h.
References llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::createBitMaskForGaps(), llvm::VPInterleaveEVLRecipe::execute(), llvm::VPInterleaveRecipe::execute(), members(), and requiresScalarEpilogue().
|
inline |
Definition at line 558 of file VectorUtils.h.
Referenced by isFull(), and llvm::LoopVectorizationCostModel::setWideningDecision().
|
inline |
Try to insert a new member Instr with index Index and alignment NewAlign.
The index is related to the leader and it could be negative if it is the new leader.
Definition at line 565 of file VectorUtils.h.
References llvm::checkedAdd(), llvm::checkedSub(), and llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving().
|
inline |
Return true if this group is full, i.e. it has no gaps.
Definition at line 657 of file VectorUtils.h.
References getFactor(), and getNumMembers().
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), and llvm::createBitMaskForGaps().
|
inline |
Definition at line 555 of file VectorUtils.h.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::createBitMaskForGaps(), llvm::VPInterleaveRecipe::execute(), and requiresScalarEpilogue().
|
inline |
Return an iterator range over the non-null members of this group, in index order.
Definition at line 612 of file VectorUtils.h.
References getMember(), I, llvm::make_filter_range(), llvm::map_range(), and llvm::seq().
Referenced by llvm::LoopVectorizationCostModel::setWideningDecision().
|
inline |
Returns true if this Group requires a scalar iteration to handle gaps.
Definition at line 642 of file VectorUtils.h.
References assert(), getFactor(), getMember(), and isReverse().
|
inline |
Definition at line 631 of file VectorUtils.h.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving().