Lines Matching refs:Dst
224 return Src->mayReadFromMemory() && Dst->mayReadFromMemory(); in isInput()
230 return Src->mayWriteToMemory() && Dst->mayWriteToMemory(); in isOutput()
236 return Src->mayWriteToMemory() && Dst->mayReadFromMemory(); in isFlow()
242 return Src->mayReadFromMemory() && Dst->mayWriteToMemory(); in isAnti()
747 const Instruction *Dst) { in establishNestingLevels() argument
749 const BasicBlock *DstBlock = Dst->getParent(); in establishNestingLevels()
833 const SCEV *Dst = Pair->Dst; in unifySubscriptType() local
835 IntegerType *DstTy = dyn_cast<IntegerType>(Dst->getType()); in unifySubscriptType()
858 const SCEV *Dst = Pair->Dst; in unifySubscriptType() local
860 IntegerType *DstTy = dyn_cast<IntegerType>(Dst->getType()); in unifySubscriptType()
872 Pair->Dst = SE->getSignExtendExpr(Dst, widestType); in unifySubscriptType()
883 const SCEV *Dst = Pair->Dst; in removeMatchingExtensions() local
884 if ((isa<SCEVZeroExtendExpr>(Src) && isa<SCEVZeroExtendExpr>(Dst)) || in removeMatchingExtensions()
885 (isa<SCEVSignExtendExpr>(Src) && isa<SCEVSignExtendExpr>(Dst))) { in removeMatchingExtensions()
887 const SCEVIntegralCastExpr *DstCast = cast<SCEVIntegralCastExpr>(Dst); in removeMatchingExtensions()
892 Pair->Dst = DstCastOp; in removeMatchingExtensions()
944 bool DependenceInfo::checkDstSubscript(const SCEV *Dst, const Loop *LoopNest, in checkDstSubscript() argument
946 return checkSubscript(Dst, LoopNest, Loops, false); in checkDstSubscript()
955 const SCEV *Dst, const Loop *DstLoopNest, in classifyPair() argument
961 if (!checkDstSubscript(Dst, DstLoopNest, DstLoops)) in classifyPair()
1120 bool DependenceInfo::testZIV(const SCEV *Src, const SCEV *Dst, in testZIV() argument
1123 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n"); in testZIV()
1125 if (isKnownPredicate(CmpInst::ICMP_EQ, Src, Dst)) { in testZIV()
1129 if (isKnownPredicate(CmpInst::ICMP_NE, Src, Dst)) { in testZIV()
2163 bool DependenceInfo::testSIV(const SCEV *Src, const SCEV *Dst, unsigned &Level, in testSIV() argument
2167 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n"); in testSIV()
2169 const SCEVAddRecExpr *DstAddRec = dyn_cast<SCEVAddRecExpr>(Dst); in testSIV()
2190 gcdMIVtest(Src, Dst, Result) || in testSIV()
2196 const SCEV *DstConst = Dst; in testSIV()
2201 gcdMIVtest(Src, Dst, Result); in testSIV()
2211 gcdMIVtest(Src, Dst, Result); in testSIV()
2231 bool DependenceInfo::testRDIV(const SCEV *Src, const SCEV *Dst, in testRDIV() argument
2244 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n"); in testRDIV()
2246 const SCEVAddRecExpr *DstAddRec = dyn_cast<SCEVAddRecExpr>(Dst); in testRDIV()
2261 DstConst = Dst; in testRDIV()
2287 gcdMIVtest(Src, Dst, Result) || in testRDIV()
2297 bool DependenceInfo::testMIV(const SCEV *Src, const SCEV *Dst, in testMIV() argument
2301 LLVM_DEBUG(dbgs() << " dst = " << *Dst << "\n"); in testMIV()
2303 return gcdMIVtest(Src, Dst, Result) || in testMIV()
2304 banerjeeMIVtest(Src, Dst, Loops, Result); in testMIV()
2339 bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst, in gcdMIVtest() argument
2369 Coefficients = Dst; in gcdMIVtest()
2464 Inner = Dst; in gcdMIVtest()
2542 bool DependenceInfo::banerjeeMIVtest(const SCEV *Src, const SCEV *Dst, in banerjeeMIVtest() argument
2550 LLVM_DEBUG(dbgs() << " Dst = " << *Dst << '\n'); in banerjeeMIVtest()
2552 CoefficientInfo *B = collectCoeffInfo(Dst, false, B0); in banerjeeMIVtest()
3090 bool DependenceInfo::propagate(const SCEV *&Src, const SCEV *&Dst, in propagate() argument
3099 Result |= propagateDistance(Src, Dst, Constraints[LI], Consistent); in propagate()
3101 Result |= propagateLine(Src, Dst, Constraints[LI], Consistent); in propagate()
3103 Result |= propagatePoint(Src, Dst, Constraints[LI]); in propagate()
3114 bool DependenceInfo::propagateDistance(const SCEV *&Src, const SCEV *&Dst, in propagateDistance() argument
3126 LLVM_DEBUG(dbgs() << "\t\tDst is " << *Dst << "\n"); in propagateDistance()
3127 Dst = addToCoefficient(Dst, CurLoop, SE->getNegativeSCEV(A_K)); in propagateDistance()
3128 LLVM_DEBUG(dbgs() << "\t\tnew Dst is " << *Dst << "\n"); in propagateDistance()
3129 if (!findCoefficient(Dst, CurLoop)->isZero()) in propagateDistance()
3140 bool DependenceInfo::propagateLine(const SCEV *&Src, const SCEV *&Dst, in propagateLine() argument
3150 LLVM_DEBUG(dbgs() << "\t\tDst = " << *Dst << "\n"); in propagateLine()
3159 const SCEV *AP_K = findCoefficient(Dst, CurLoop); in propagateLine()
3162 Dst = zeroCoefficient(Dst, CurLoop); in propagateLine()
3177 if (!findCoefficient(Dst, CurLoop)->isZero()) in propagateLine()
3191 Dst = addToCoefficient(Dst, CurLoop, A_K); in propagateLine()
3192 if (!findCoefficient(Dst, CurLoop)->isZero()) in propagateLine()
3199 Dst = SE->getMulExpr(Dst, A); in propagateLine()
3202 Dst = addToCoefficient(Dst, CurLoop, SE->getMulExpr(A_K, B)); in propagateLine()
3203 if (!findCoefficient(Dst, CurLoop)->isZero()) in propagateLine()
3207 LLVM_DEBUG(dbgs() << "\t\tnew Dst = " << *Dst << "\n"); in propagateLine()
3215 bool DependenceInfo::propagatePoint(const SCEV *&Src, const SCEV *&Dst, in propagatePoint() argument
3219 const SCEV *AP_K = findCoefficient(Dst, CurLoop); in propagatePoint()
3226 LLVM_DEBUG(dbgs() << "\t\tDst is " << *Dst << "\n"); in propagatePoint()
3227 Dst = zeroCoefficient(Dst, CurLoop); in propagatePoint()
3228 LLVM_DEBUG(dbgs() << "\t\tnew Dst is " << *Dst << "\n"); in propagatePoint()
3287 bool DependenceInfo::tryDelinearize(Instruction *Src, Instruction *Dst, in tryDelinearize() argument
3290 assert(isLoadOrStore(Dst) && "instruction is not load or store"); in tryDelinearize()
3292 Value *DstPtr = getLoadStorePointerOperand(Dst); in tryDelinearize()
3294 Loop *DstLoop = LI->getLoopFor(Dst->getParent()); in tryDelinearize()
3307 if (!tryDelinearizeFixedSize(Src, Dst, SrcAccessFn, DstAccessFn, in tryDelinearize()
3309 !tryDelinearizeParametricSize(Src, Dst, SrcAccessFn, DstAccessFn, in tryDelinearize()
3330 Pair[I].Dst = DstSubscripts[I]; in tryDelinearize()
3341 Instruction *Src, Instruction *Dst, const SCEV *SrcAccessFn, in tryDelinearizeFixedSize() argument
3357 !tryDelinearizeFixedSizeImpl(SE, Dst, DstAccessFn, DstSubscripts, in tryDelinearizeFixedSize()
3375 Value *DstPtr = getLoadStorePointerOperand(Dst); in tryDelinearizeFixedSize()
3418 Instruction *Src, Instruction *Dst, const SCEV *SrcAccessFn, in tryDelinearizeParametricSize() argument
3423 Value *DstPtr = getLoadStorePointerOperand(Dst); in tryDelinearizeParametricSize()
3432 if (ElementSize != SE->getElementSize(Dst)) in tryDelinearizeParametricSize()
3527 DependenceInfo::depends(Instruction *Src, Instruction *Dst, in depends() argument
3529 if (Src == Dst) in depends()
3532 if (!(Src->mayReadOrWriteMemory() && Dst->mayReadOrWriteMemory())) in depends()
3536 if (!isLoadOrStore(Src) || !isLoadOrStore(Dst)) { in depends()
3539 return std::make_unique<Dependence>(Src, Dst); in depends()
3543 assert(isLoadOrStore(Dst) && "instruction is not load or store"); in depends()
3545 Value *DstPtr = getLoadStorePointerOperand(Dst); in depends()
3548 MemoryLocation::get(Dst), in depends()
3554 return std::make_unique<Dependence>(Src, Dst); in depends()
3564 establishNestingLevels(Src, Dst); in depends()
3568 FullDependence Result(Src, Dst, PossiblyLoopIndependent, CommonLevels); in depends()
3585 return std::make_unique<Dependence>(Src, Dst); in depends()
3588 Pair[0].Dst = DstSCEV; in depends()
3591 if (tryDelinearize(Src, Dst, Pair)) { in depends()
3604 Pair[P].Dst, LI->getLoopFor(Dst->getParent()), in depends()
3610 LLVM_DEBUG(dbgs() << "\tdst = " << *Pair[P].Dst << "\n"); in depends()
3683 collectCommonLoops(Pair[SI].Dst, in depends()
3684 LI->getLoopFor(Dst->getParent()), in depends()
3732 if (testZIV(Pair[SI].Src, Pair[SI].Dst, Result)) in depends()
3739 if (testSIV(Pair[SI].Src, Pair[SI].Dst, Level, Result, NewConstraint, in depends()
3746 if (testRDIV(Pair[SI].Src, Pair[SI].Dst, Result)) in depends()
3751 if (testMIV(Pair[SI].Src, Pair[SI].Dst, Pair[SI].Loops, Result)) in depends()
3791 if (testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, Result, NewConstraint, in depends()
3812 if (propagate(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops, in depends()
3818 Pair[SJ].Dst, LI->getLoopFor(Dst->getParent()), in depends()
3823 if (testZIV(Pair[SJ].Src, Pair[SJ].Dst, Result)) in depends()
3846 if (testRDIV(Pair[SJ].Src, Pair[SJ].Dst, Result)) in depends()
3859 if (testMIV(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops, Result)) in depends()
3966 Instruction *Dst = Dep.getDst(); in getSplitIteration() local
3968 assert(Dst->mayReadFromMemory() || Dst->mayWriteToMemory()); in getSplitIteration()
3970 assert(isLoadOrStore(Dst)); in getSplitIteration()
3972 Value *DstPtr = getLoadStorePointerOperand(Dst); in getSplitIteration()
3974 AA, F->getParent()->getDataLayout(), MemoryLocation::get(Dst), in getSplitIteration()
3978 establishNestingLevels(Src, Dst); in getSplitIteration()
3980 FullDependence Result(Src, Dst, false, CommonLevels); in getSplitIteration()
3987 Pair[0].Dst = DstSCEV; in getSplitIteration()
3990 if (tryDelinearize(Src, Dst, Pair)) { in getSplitIteration()
4003 Pair[P].Dst, LI->getLoopFor(Dst->getParent()), in getSplitIteration()
4019 collectCommonLoops(Pair[SI].Dst, in getSplitIteration()
4020 LI->getLoopFor(Dst->getParent()), in getSplitIteration()
4058 (void) testSIV(Pair[SI].Src, Pair[SI].Dst, Level, in getSplitIteration()
4097 (void) testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, in getSplitIteration()
4110 if (propagate(Pair[SJ].Src, Pair[SJ].Dst, in getSplitIteration()
4114 Pair[SJ].Dst, LI->getLoopFor(Dst->getParent()), in getSplitIteration()