Lines Matching defs:Dst
188 OS << "Src:" << *SrcI << " --> Dst:" << *DstI << "\n";
231 return Src->mayReadFromMemory() && Dst->mayReadFromMemory();
237 return Src->mayWriteToMemory() && Dst->mayWriteToMemory();
243 return Src->mayWriteToMemory() && Dst->mayReadFromMemory();
249 return Src->mayReadFromMemory() && Dst->mayWriteToMemory();
279 // Dst: use(A[31 - i]);
282 // flow { Src[i] -> Dst[31 - i] : when i >= 16 } and
283 // anti { Dst[i] -> Src[31 - i] : when i < 16 },
309 std::swap(Src, Dst);
759 // Examines the loop nesting of the Src and Dst
776 // ... - loops containing Src but not Dst
777 // SrcLevels - innermost loop containing Src but not Dst
778 // ... - loops containing Dst but not Src
779 // MaxLevels - innermost loops containing Dst but not Src
798 // to A (the Src) and the load from A (the Dst), we'll note that they
810 const Instruction *Dst) {
812 const BasicBlock *DstBlock = Dst->getParent();
896 const SCEV *Dst = Pair->Dst;
898 IntegerType *DstTy = dyn_cast<IntegerType>(Dst->getType());
901 "expect Src and Dst share the same type "
921 const SCEV *Dst = Pair->Dst;
923 IntegerType *DstTy = dyn_cast<IntegerType>(Dst->getType());
926 "expect Src and Dst share the same type "
934 // Sign-extend Dst to widestType
935 Pair->Dst = SE->getSignExtendExpr(Dst, widestType);
946 const SCEV *Dst = Pair->Dst;
947 if ((isa<SCEVZeroExtendExpr>(Src) && isa<SCEVZeroExtendExpr>(Dst)) ||
948 (isa<SCEVSignExtendExpr>(Src) && isa<SCEVSignExtendExpr>(Dst))) {
950 const SCEVIntegralCastExpr *DstCast = cast<SCEVIntegralCastExpr>(Dst);
955 Pair->Dst = DstCastOp;
1007 bool DependenceInfo::checkDstSubscript(const SCEV *Dst, const Loop *LoopNest,
1009 return checkSubscript(Dst, LoopNest, Loops, false);
1013 // Examines the subscript pair (the Src and Dst SCEVs)
1018 const SCEV *Dst, const Loop *DstLoopNest,
1024 if (!checkDstSubscript(Dst, DstLoopNest, DstLoops))
1183 bool DependenceInfo::testZIV(const SCEV *Src, const SCEV *Dst,
1186 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n");
1188 if (isKnownPredicate(CmpInst::ICMP_EQ, Src, Dst)) {
1192 if (isKnownPredicate(CmpInst::ICMP_NE, Src, Dst)) {
1564 // only tested whether Dst depends on Src. This algorithm extends that and
1565 // returns all the dependencies that exist between Dst and Src.
1766 // the Src and Dst loops. If it isn't, then there's no need to
1876 // Src and Dst loops. If it isn't, then there's no need to record a direction.
2226 bool DependenceInfo::testSIV(const SCEV *Src, const SCEV *Dst, unsigned &Level,
2230 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n");
2232 const SCEVAddRecExpr *DstAddRec = dyn_cast<SCEVAddRecExpr>(Dst);
2253 gcdMIVtest(Src, Dst, Result) ||
2259 const SCEV *DstConst = Dst;
2264 gcdMIVtest(Src, Dst, Result);
2274 gcdMIVtest(Src, Dst, Result);
2294 bool DependenceInfo::testRDIV(const SCEV *Src, const SCEV *Dst,
2307 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n");
2309 const SCEVAddRecExpr *DstAddRec = dyn_cast<SCEVAddRecExpr>(Dst);
2324 DstConst = Dst;
2350 gcdMIVtest(Src, Dst, Result) ||
2357 // Tests the single-subscript MIV pair (Src and Dst) for dependence.
2360 bool DependenceInfo::testMIV(const SCEV *Src, const SCEV *Dst,
2364 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n");
2366 return gcdMIVtest(Src, Dst, Result) ||
2367 banerjeeMIVtest(Src, Dst, Loops, Result);
2402 bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst,
2428 // Examine Dst coefficients.
2432 Coefficients = Dst;
2527 Inner = Dst;
2605 bool DependenceInfo::banerjeeMIVtest(const SCEV *Src, const SCEV *Dst,
2613 LLVM_DEBUG(dbgs() << " Dst = " << *Dst << '\n');
2615 CoefficientInfo *B = collectCoeffInfo(Dst, false, B0);
3144 // to simplify a subscript pair (Src and Dst).
3153 bool DependenceInfo::propagate(const SCEV *&Src, const SCEV *&Dst,
3162 Result |= propagateDistance(Src, Dst, Constraints[LI], Consistent);
3164 Result |= propagateLine(Src, Dst, Constraints[LI], Consistent);
3166 Result |= propagatePoint(Src, Dst, Constraints[LI]);
3173 // constraint into a subscript pair (Src and Dst).
3177 bool DependenceInfo::propagateDistance(const SCEV *&Src, const SCEV *&Dst,
3189 LLVM_DEBUG(dbgs() << "\t\tDst is " << *Dst << "\n");
3190 Dst = addToCoefficient(Dst, CurLoop, SE->getNegativeSCEV(A_K));
3191 LLVM_DEBUG(dbgs() << "\t\tnew Dst is " << *Dst << "\n");
3192 if (!findCoefficient(Dst, CurLoop)->isZero())
3199 // constraint into a subscript pair (Src and Dst).
3203 bool DependenceInfo::propagateLine(const SCEV *&Src, const SCEV *&Dst,
3213 LLVM_DEBUG(dbgs() << "\t\tDst = " << *Dst << "\n");
3222 const SCEV *AP_K = findCoefficient(Dst, CurLoop);
3225 Dst = zeroCoefficient(Dst, CurLoop);
3240 if (!findCoefficient(Dst, CurLoop)->isZero())
3254 Dst = addToCoefficient(Dst, CurLoop, A_K);
3255 if (!findCoefficient(Dst, CurLoop)->isZero())
3262 Dst = SE->getMulExpr(Dst, A);
3265 Dst = addToCoefficient(Dst, CurLoop, SE->getMulExpr(A_K, B));
3266 if (!findCoefficient(Dst, CurLoop)->isZero())
3270 LLVM_DEBUG(dbgs() << "\t\tnew Dst = " << *Dst << "\n");
3276 // constraint into a subscript pair (Src and Dst).
3278 bool DependenceInfo::propagatePoint(const SCEV *&Src, const SCEV *&Dst,
3282 const SCEV *AP_K = findCoefficient(Dst, CurLoop);
3289 LLVM_DEBUG(dbgs() << "\t\tDst is " << *Dst << "\n");
3290 Dst = zeroCoefficient(Dst, CurLoop);
3291 LLVM_DEBUG(dbgs() << "\t\tnew Dst is " << *Dst << "\n");
3350 bool DependenceInfo::tryDelinearize(Instruction *Src, Instruction *Dst,
3353 assert(isLoadOrStore(Dst) && "instruction is not load or store");
3355 Value *DstPtr = getLoadStorePointerOperand(Dst);
3357 Loop *DstLoop = LI->getLoopFor(Dst->getParent());
3370 if (!tryDelinearizeFixedSize(Src, Dst, SrcAccessFn, DstAccessFn,
3372 !tryDelinearizeParametricSize(Src, Dst, SrcAccessFn, DstAccessFn,
3393 Pair[I].Dst = DstSubscripts[I];
3404 Instruction *Src, Instruction *Dst, const SCEV *SrcAccessFn,
3420 !tryDelinearizeFixedSizeImpl(SE, Dst, DstAccessFn, DstSubscripts,
3438 Value *DstPtr = getLoadStorePointerOperand(Dst);
3481 Instruction *Src, Instruction *Dst, const SCEV *SrcAccessFn,
3486 Value *DstPtr = getLoadStorePointerOperand(Dst);
3495 if (ElementSize != SE->getElementSize(Dst))
3590 DependenceInfo::depends(Instruction *Src, Instruction *Dst,
3592 if (Src == Dst)
3595 if (!(Src->mayReadOrWriteMemory() && Dst->mayReadOrWriteMemory()))
3599 if (!isLoadOrStore(Src) || !isLoadOrStore(Dst)) {
3602 return std::make_unique<Dependence>(Src, Dst);
3606 assert(isLoadOrStore(Dst) && "instruction is not load or store");
3608 Value *DstPtr = getLoadStorePointerOperand(Dst);
3611 MemoryLocation::get(Dst),
3617 return std::make_unique<Dependence>(Src, Dst);
3627 establishNestingLevels(Src, Dst);
3631 FullDependence Result(Src, Dst, PossiblyLoopIndependent, CommonLevels);
3648 return std::make_unique<Dependence>(Src, Dst);
3651 Pair[0].Dst = DstSCEV;
3654 if (tryDelinearize(Src, Dst, Pair)) {
3667 Pair[P].Dst, LI->getLoopFor(Dst->getParent()),
3673 LLVM_DEBUG(dbgs() << "\tdst = " << *Pair[P].Dst << "\n");
3712 // Src Dst Classification Loops GroupLoops Group
3746 collectCommonLoops(Pair[SI].Dst,
3747 LI->getLoopFor(Dst->getParent()),
3795 if (testZIV(Pair[SI].Src, Pair[SI].Dst, Result))
3802 if (testSIV(Pair[SI].Src, Pair[SI].Dst, Level, Result, NewConstraint,
3809 if (testRDIV(Pair[SI].Src, Pair[SI].Dst, Result))
3814 if (testMIV(Pair[SI].Src, Pair[SI].Dst, Pair[SI].Loops, Result))
3854 if (testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, Result, NewConstraint,
3875 if (propagate(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops,
3881 Pair[SJ].Dst, LI->getLoopFor(Dst->getParent()),
3886 if (testZIV(Pair[SJ].Src, Pair[SJ].Dst, Result))
3909 if (testRDIV(Pair[SJ].Src, Pair[SJ].Dst, Result))
3922 if (testMIV(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops, Result))
4029 Instruction *Dst = Dep.getDst();
4031 assert(Dst->mayReadFromMemory() || Dst->mayWriteToMemory());
4033 assert(isLoadOrStore(Dst));
4035 Value *DstPtr = getLoadStorePointerOperand(Dst);
4037 AA, F->getDataLayout(), MemoryLocation::get(Dst),
4041 establishNestingLevels(Src, Dst);
4043 FullDependence Result(Src, Dst, false, CommonLevels);
4050 Pair[0].Dst = DstSCEV;
4053 if (tryDelinearize(Src, Dst, Pair)) {
4066 Pair[P].Dst, LI->getLoopFor(Dst->getParent()),
4082 collectCommonLoops(Pair[SI].Dst,
4083 LI->getLoopFor(Dst->getParent()),
4121 (void) testSIV(Pair[SI].Src, Pair[SI].Dst, Level,
4160 (void) testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level,
4173 if (propagate(Pair[SJ].Src, Pair[SJ].Dst,
4177 Pair[SJ].Dst, LI->getLoopFor(Dst->getParent()),