Lines Matching defs:ChainElem
157 struct ChainElem {
160 ChainElem(Instruction *Inst, APInt OffsetFromLeader)
163 using Chain = SmallVector<ChainElem, 1>;
177 [[maybe_unused]] void dumpChain(ArrayRef<ChainElem> C) {
191 for (const ChainElem &E : C)
315 /// Determines whether ChainElem can be moved up (if IsLoad) or down (if
320 /// [ChainBegin, ChainElem] and their offsets from some arbitrary base
324 Instruction *ChainElem, Instruction *ChainBegin,
568 SmallVector<ChainElem, 1> NewChain;
590 NewChain = SmallVector<ChainElem, 1>({*ChainIt});
627 const ChainElem &Prev = CurChain.back();
664 if (any_of(C, [](const ChainElem &E) {
672 for (const ChainElem &E : C)
873 C.begin(), C.end(), 0u, [&](unsigned Bytes, const ChainElem &E) {
894 for (const ChainElem &E : C)
915 for (const ChainElem &E : C) {
968 for (const ChainElem &E : C) {
991 for (const ChainElem &E : C)
1001 Instruction *ChainElem, Instruction *ChainBegin,
1003 LLVM_DEBUG(dbgs() << "LSV: isSafeToMove(" << *ChainElem << " -> "
1006 assert(isa<LoadInst>(ChainElem) == IsLoadChain);
1007 if (ChainElem == ChainBegin)
1012 if (isInvariantLoad(ChainElem))
1017 return BasicBlock::reverse_iterator(ChainElem);
1019 return BasicBlock::iterator(ChainElem);
1028 const APInt &ChainElemOffset = ChainOffsets.at(ChainElem);
1030 DL.getTypeStoreSize(getLoadStoreType(ChainElem));
1053 // I and ChainElem overlap if:
1054 // - I and ChainElem have the same offset, OR
1055 // - I's offset is less than ChainElem's, but I touches past the
1056 // beginning of ChainElem, OR
1057 // - ChainElem's offset is less than I's, but ChainElem touches past the
1069 ModRefInfo MR = AA.getModRefInfo(I, MemoryLocation::get(ChainElem));
1080 ModRefInfo MR = AA.getModRefInfo(I, MemoryLocation::get(ChainElem));
1086 << " " << *ChainElem << '\n'
1087 << " " << *getLoadStorePointerOperand(ChainElem)