|
LLVM
7.0.0
|
The group of interleaved loads/stores sharing the same stride and close to each other. More...
Public Member Functions | |
| InterleaveGroup (Instruction *Instr, int Stride, unsigned Align) | |
| bool | isReverse () const |
| unsigned | getFactor () const |
| unsigned | getAlignment () const |
| unsigned | getNumMembers () const |
| bool | insertMember (Instruction *Instr, int Index, unsigned NewAlign) |
Try to insert a new member Instr with index Index and alignment NewAlign. More... | |
| Instruction * | getMember (unsigned Index) const |
Get the member with the given index Index. More... | |
| unsigned | getIndex (Instruction *Instr) const |
| Get the index for the given member. More... | |
| Instruction * | getInsertPos () const |
| void | setInsertPos (Instruction *Inst) |
| void | addMetadata (Instruction *NewInst) const |
| Add metadata (e.g. More... | |
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 830 of file LoopVectorize.cpp.
|
inline |
Definition at line 832 of file LoopVectorize.cpp.
References llvm::abs(), and assert().
|
inline |
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 912 of file LoopVectorize.cpp.
References llvm::abs(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, assert(), B, llvm::LoopAccessInfo::blockNeedsPredication(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::InnerLoopVectorizer::DT, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::LoopAccessInfo::getDepChecker(), llvm::MemoryDepChecker::getDependences(), getFactor(), getMember(), I, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::HexagonMCInstrInfo::isPredicated(), llvm::InnerLoopVectorizer::LI, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), MaxInterleaveGroupFactor, llvm::propagateMetadata(), llvm::InnerLoopVectorizer::PSE, Ptr, llvm::cl::Sink, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, and llvm::transform().
Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 845 of file LoopVectorize.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align.
Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 844 of file LoopVectorize.cpp.
Referenced by addMetadata(), llvm::LoopVectorizationCostModel::setWideningDecision(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Get the index for the given member.
Unlike the key in the member map, the index starts from 0.
Definition at line 895 of file LoopVectorize.cpp.
References I, and llvm_unreachable.
Referenced by llvm::LoopVectorizationCostModel::memoryInstructionCanBeWidened(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 903 of file LoopVectorize.cpp.
Referenced by llvm::LoopVectorizationCostModel::setWideningDecision(), llvm::VPRecipeBuilder::tryToCreateRecipe(), llvm::VPRecipeBuilder::tryToInterleaveMemory(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Get the member with the given index Index.
Definition at line 885 of file LoopVectorize.cpp.
Referenced by addMetadata(), llvm::LoopVectorizationCostModel::setWideningDecision(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 846 of file LoopVectorize.cpp.
|
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 853 of file LoopVectorize.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, and assert().
Referenced by llvm::LoopVectorizationCostModel::memoryInstructionCanBeWidened().
|
inline |
Definition at line 843 of file LoopVectorize.cpp.
Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 904 of file LoopVectorize.cpp.
Referenced by llvm::LoopVectorizationCostModel::memoryInstructionCanBeWidened().
1.8.13