class InterleaveGroup
Declaration
template <typename InstTy>
class InterleaveGroup { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:417
Templates
- InstTy
Method Overview
- public InterleaveGroup<InstTy>(uint32_t Factor, bool Reverse, llvm::Align Alignment)
- public InterleaveGroup<InstTy>(InstTy * Instr, int32_t Stride, llvm::Align Alignment)
- public void addMetadata(InstTy * NewInst) const
- public uint32_t getAlignment() const
- public uint32_t getFactor() const
- public uint32_t getIndex(const InstTy * Instr) const
- public InstTy * getInsertPos() const
- public InstTy * getMember(uint32_t Index) const
- public uint32_t getNumMembers() const
- public bool insertMember(InstTy * Instr, int32_t Index, llvm::Align NewAlign)
- public bool isReverse() const
- public bool requiresScalarEpilogue() const
- public void setInsertPos(InstTy * Inst)
Methods
¶InterleaveGroup<InstTy>(uint32_t Factor,
bool Reverse,
llvm::Align Alignment)
InterleaveGroup<InstTy>(uint32_t Factor,
bool Reverse,
llvm::Align Alignment)
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:419
Parameters
- uint32_t Factor
- bool Reverse
- llvm::Align Alignment
¶InterleaveGroup<InstTy>(InstTy* Instr,
int32_t Stride,
llvm::Align Alignment)
InterleaveGroup<InstTy>(InstTy* Instr,
int32_t Stride,
llvm::Align Alignment)
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:423
Parameters
- InstTy* Instr
- int32_t Stride
- llvm::Align Alignment
¶void addMetadata(InstTy* NewInst) const
void addMetadata(InstTy* NewInst) const
Description
Add metadata (e.g. alias info) from the instructions in this group to \p 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.
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:511
Parameters
- InstTy* NewInst
¶uint32_t getAlignment() const
uint32_t getAlignment() const
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:434
¶uint32_t getFactor() const
uint32_t getFactor() const
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:433
¶uint32_t getIndex(const InstTy* Instr) const
uint32_t getIndex(const InstTy* Instr) const
Description
Get the index for the given member. Unlike the key in the member map, the index starts from 0.
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:493
Parameters
- const InstTy* Instr
¶InstTy* getInsertPos() const
InstTy* getInsertPos() const
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:502
¶InstTy* getMember(uint32_t Index) const
InstTy* getMember(uint32_t Index) const
Description
Get the member with the given index \p Index
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:482
Parameters
- uint32_t Index
Returns
nullptr if contains no such member.
¶uint32_t getNumMembers() const
uint32_t getNumMembers() const
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:435
¶bool insertMember(InstTy* Instr,
int32_t Index,
llvm::Align NewAlign)
bool insertMember(InstTy* Instr,
int32_t Index,
llvm::Align NewAlign)
Description
Try to insert a new member \p Instr with index \p Index and alignment \p NewAlign. The index is related to the leader and it could be negative if it is the new leader.
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:442
Parameters
- InstTy* Instr
- int32_t Index
- llvm::Align NewAlign
Returns
false if the instruction doesn't belong to the group.
¶bool isReverse() const
bool isReverse() const
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:432
¶bool requiresScalarEpilogue() const
bool requiresScalarEpilogue() const
Description
Returns true if this Group requires a scalar iteration to handle gaps.
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:514
¶void setInsertPos(InstTy* Inst)
void setInsertPos(InstTy* Inst)
Declared at: llvm/include/llvm/Analysis/VectorUtils.h:503
Parameters
- InstTy* Inst