Lines Matching refs:Src

231   return Src->mayReadFromMemory() && Dst->mayReadFromMemory();  in isInput()
237 return Src->mayWriteToMemory() && Dst->mayWriteToMemory(); in isOutput()
243 return Src->mayWriteToMemory() && Dst->mayReadFromMemory(); in isFlow()
249 return Src->mayReadFromMemory() && Dst->mayWriteToMemory(); in isAnti()
309 std::swap(Src, Dst); in normalize()
809 void DependenceInfo::establishNestingLevels(const Instruction *Src, in establishNestingLevels() argument
811 const BasicBlock *SrcBlock = Src->getParent(); in establishNestingLevels()
895 const SCEV *Src = Pair->Src; in unifySubscriptType() local
897 IntegerType *SrcTy = dyn_cast<IntegerType>(Src->getType()); in unifySubscriptType()
920 const SCEV *Src = Pair->Src; in unifySubscriptType() local
922 IntegerType *SrcTy = dyn_cast<IntegerType>(Src->getType()); in unifySubscriptType()
932 Pair->Src = SE->getSignExtendExpr(Src, widestType); in unifySubscriptType()
945 const SCEV *Src = Pair->Src; in removeMatchingExtensions() local
947 if ((isa<SCEVZeroExtendExpr>(Src) && isa<SCEVZeroExtendExpr>(Dst)) || in removeMatchingExtensions()
948 (isa<SCEVSignExtendExpr>(Src) && isa<SCEVSignExtendExpr>(Dst))) { in removeMatchingExtensions()
949 const SCEVIntegralCastExpr *SrcCast = cast<SCEVIntegralCastExpr>(Src); in removeMatchingExtensions()
954 Pair->Src = SrcCastOp; in removeMatchingExtensions()
1000 bool DependenceInfo::checkSrcSubscript(const SCEV *Src, const Loop *LoopNest, in checkSrcSubscript() argument
1002 return checkSubscript(Src, LoopNest, Loops, true); in checkSrcSubscript()
1017 DependenceInfo::classifyPair(const SCEV *Src, const Loop *SrcLoopNest, in classifyPair() argument
1022 if (!checkSrcSubscript(Src, SrcLoopNest, SrcLoops)) in classifyPair()
1183 bool DependenceInfo::testZIV(const SCEV *Src, const SCEV *Dst, in testZIV() argument
1185 LLVM_DEBUG(dbgs() << " src = " << *Src << "\n"); in testZIV()
1188 if (isKnownPredicate(CmpInst::ICMP_EQ, Src, Dst)) { in testZIV()
1192 if (isKnownPredicate(CmpInst::ICMP_NE, Src, Dst)) { in testZIV()
2226 bool DependenceInfo::testSIV(const SCEV *Src, const SCEV *Dst, unsigned &Level, in testSIV() argument
2229 LLVM_DEBUG(dbgs() << " src = " << *Src << "\n"); in testSIV()
2231 const SCEVAddRecExpr *SrcAddRec = dyn_cast<SCEVAddRecExpr>(Src); in testSIV()
2253 gcdMIVtest(Src, Dst, Result) || in testSIV()
2264 gcdMIVtest(Src, Dst, Result); in testSIV()
2269 const SCEV *SrcConst = Src; in testSIV()
2274 gcdMIVtest(Src, Dst, Result); in testSIV()
2294 bool DependenceInfo::testRDIV(const SCEV *Src, const SCEV *Dst, in testRDIV() argument
2306 LLVM_DEBUG(dbgs() << " src = " << *Src << "\n"); in testRDIV()
2308 const SCEVAddRecExpr *SrcAddRec = dyn_cast<SCEVAddRecExpr>(Src); in testRDIV()
2337 SrcConst = Src; in testRDIV()
2350 gcdMIVtest(Src, Dst, Result) || in testRDIV()
2360 bool DependenceInfo::testMIV(const SCEV *Src, const SCEV *Dst, in testMIV() argument
2363 LLVM_DEBUG(dbgs() << " src = " << *Src << "\n"); in testMIV()
2366 return gcdMIVtest(Src, Dst, Result) || in testMIV()
2367 banerjeeMIVtest(Src, Dst, Loops, Result); in testMIV()
2402 bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst, in gcdMIVtest() argument
2406 unsigned BitWidth = SE->getTypeSizeInBits(Src->getType()); in gcdMIVtest()
2413 const SCEV *Coefficients = Src; in gcdMIVtest()
2502 Coefficients = Src; in gcdMIVtest()
2510 const SCEV *Inner = Src; in gcdMIVtest()
2605 bool DependenceInfo::banerjeeMIVtest(const SCEV *Src, const SCEV *Dst, in banerjeeMIVtest() argument
2610 LLVM_DEBUG(dbgs() << " Src = " << *Src << '\n'); in banerjeeMIVtest()
2612 CoefficientInfo *A = collectCoeffInfo(Src, true, A0); in banerjeeMIVtest()
3153 bool DependenceInfo::propagate(const SCEV *&Src, const SCEV *&Dst, in propagate() argument
3162 Result |= propagateDistance(Src, Dst, Constraints[LI], Consistent); in propagate()
3164 Result |= propagateLine(Src, Dst, Constraints[LI], Consistent); in propagate()
3166 Result |= propagatePoint(Src, Dst, Constraints[LI]); in propagate()
3177 bool DependenceInfo::propagateDistance(const SCEV *&Src, const SCEV *&Dst, in propagateDistance() argument
3181 LLVM_DEBUG(dbgs() << "\t\tSrc is " << *Src << "\n"); in propagateDistance()
3182 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateDistance()
3186 Src = SE->getMinusSCEV(Src, DA_K); in propagateDistance()
3187 Src = zeroCoefficient(Src, CurLoop); in propagateDistance()
3188 LLVM_DEBUG(dbgs() << "\t\tnew Src is " << *Src << "\n"); in propagateDistance()
3203 bool DependenceInfo::propagateLine(const SCEV *&Src, const SCEV *&Dst, in propagateLine() argument
3212 LLVM_DEBUG(dbgs() << "\t\tSrc = " << *Src << "\n"); in propagateLine()
3224 Src = SE->getMinusSCEV(Src, SE->getMulExpr(AP_K, SE->getConstant(CdivB))); in propagateLine()
3226 if (!findCoefficient(Src, CurLoop)->isZero()) in propagateLine()
3237 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateLine()
3238 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, SE->getConstant(CdivA))); in propagateLine()
3239 Src = zeroCoefficient(Src, CurLoop); in propagateLine()
3251 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateLine()
3252 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, SE->getConstant(CdivA))); in propagateLine()
3253 Src = zeroCoefficient(Src, CurLoop); in propagateLine()
3260 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateLine()
3261 Src = SE->getMulExpr(Src, A); in propagateLine()
3263 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, C)); in propagateLine()
3264 Src = zeroCoefficient(Src, CurLoop); in propagateLine()
3269 LLVM_DEBUG(dbgs() << "\t\tnew Src = " << *Src << "\n"); in propagateLine()
3278 bool DependenceInfo::propagatePoint(const SCEV *&Src, const SCEV *&Dst, in propagatePoint() argument
3281 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagatePoint()
3285 LLVM_DEBUG(dbgs() << "\t\tSrc is " << *Src << "\n"); in propagatePoint()
3286 Src = SE->getAddExpr(Src, SE->getMinusSCEV(XA_K, YAP_K)); in propagatePoint()
3287 Src = zeroCoefficient(Src, CurLoop); in propagatePoint()
3288 LLVM_DEBUG(dbgs() << "\t\tnew Src is " << *Src << "\n"); in propagatePoint()
3350 bool DependenceInfo::tryDelinearize(Instruction *Src, Instruction *Dst, in tryDelinearize() argument
3352 assert(isLoadOrStore(Src) && "instruction is not load or store"); in tryDelinearize()
3354 Value *SrcPtr = getLoadStorePointerOperand(Src); in tryDelinearize()
3356 Loop *SrcLoop = LI->getLoopFor(Src->getParent()); in tryDelinearize()
3370 if (!tryDelinearizeFixedSize(Src, Dst, SrcAccessFn, DstAccessFn, in tryDelinearize()
3372 !tryDelinearizeParametricSize(Src, Dst, SrcAccessFn, DstAccessFn, in tryDelinearize()
3392 Pair[I].Src = SrcSubscripts[I]; in tryDelinearize()
3404 Instruction *Src, Instruction *Dst, const SCEV *SrcAccessFn, in tryDelinearizeFixedSize() argument
3418 if (!tryDelinearizeFixedSizeImpl(SE, Src, SrcAccessFn, SrcSubscripts, in tryDelinearizeFixedSize()
3437 Value *SrcPtr = getLoadStorePointerOperand(Src); in tryDelinearizeFixedSize()
3481 Instruction *Src, Instruction *Dst, const SCEV *SrcAccessFn, in tryDelinearizeParametricSize() argument
3485 Value *SrcPtr = getLoadStorePointerOperand(Src); in tryDelinearizeParametricSize()
3494 const SCEV *ElementSize = SE->getElementSize(Src); in tryDelinearizeParametricSize()
3590 DependenceInfo::depends(Instruction *Src, Instruction *Dst, in depends() argument
3592 if (Src == Dst) in depends()
3595 if (!(Src->mayReadOrWriteMemory() && Dst->mayReadOrWriteMemory())) in depends()
3599 if (!isLoadOrStore(Src) || !isLoadOrStore(Dst)) { in depends()
3602 return std::make_unique<Dependence>(Src, Dst); in depends()
3605 assert(isLoadOrStore(Src) && "instruction is not load or store"); in depends()
3607 Value *SrcPtr = getLoadStorePointerOperand(Src); in depends()
3612 MemoryLocation::get(Src))) { in depends()
3617 return std::make_unique<Dependence>(Src, Dst); in depends()
3627 establishNestingLevels(Src, Dst); in depends()
3631 FullDependence Result(Src, Dst, PossiblyLoopIndependent, CommonLevels); in depends()
3648 return std::make_unique<Dependence>(Src, Dst); in depends()
3650 Pair[0].Src = SrcSCEV; in depends()
3654 if (tryDelinearize(Src, Dst, Pair)) { in depends()
3666 classifyPair(Pair[P].Src, LI->getLoopFor(Src->getParent()), in depends()
3672 LLVM_DEBUG(dbgs() << "\tsrc = " << *Pair[P].Src << "\n"); in depends()
3743 collectCommonLoops(Pair[SI].Src, in depends()
3744 LI->getLoopFor(Src->getParent()), in depends()
3795 if (testZIV(Pair[SI].Src, Pair[SI].Dst, Result)) in depends()
3802 if (testSIV(Pair[SI].Src, Pair[SI].Dst, Level, Result, NewConstraint, in depends()
3809 if (testRDIV(Pair[SI].Src, Pair[SI].Dst, Result)) in depends()
3814 if (testMIV(Pair[SI].Src, Pair[SI].Dst, Pair[SI].Loops, Result)) in depends()
3854 if (testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, Result, NewConstraint, in depends()
3875 if (propagate(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops, in depends()
3880 classifyPair(Pair[SJ].Src, LI->getLoopFor(Src->getParent()), in depends()
3886 if (testZIV(Pair[SJ].Src, Pair[SJ].Dst, Result)) in depends()
3909 if (testRDIV(Pair[SJ].Src, Pair[SJ].Dst, Result)) in depends()
3922 if (testMIV(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops, Result)) in depends()
4028 Instruction *Src = Dep.getSrc(); in getSplitIteration() local
4030 assert(Src->mayReadFromMemory() || Src->mayWriteToMemory()); in getSplitIteration()
4032 assert(isLoadOrStore(Src)); in getSplitIteration()
4034 Value *SrcPtr = getLoadStorePointerOperand(Src); in getSplitIteration()
4038 MemoryLocation::get(Src)) == AliasResult::MustAlias); in getSplitIteration()
4041 establishNestingLevels(Src, Dst); in getSplitIteration()
4043 FullDependence Result(Src, Dst, false, CommonLevels); in getSplitIteration()
4049 Pair[0].Src = SrcSCEV; in getSplitIteration()
4053 if (tryDelinearize(Src, Dst, Pair)) { in getSplitIteration()
4065 classifyPair(Pair[P].Src, LI->getLoopFor(Src->getParent()), in getSplitIteration()
4079 collectCommonLoops(Pair[SI].Src, in getSplitIteration()
4080 LI->getLoopFor(Src->getParent()), in getSplitIteration()
4121 (void) testSIV(Pair[SI].Src, Pair[SI].Dst, Level, in getSplitIteration()
4160 (void) testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, in getSplitIteration()
4173 if (propagate(Pair[SJ].Src, Pair[SJ].Dst, in getSplitIteration()
4176 classifyPair(Pair[SJ].Src, LI->getLoopFor(Src->getParent()), in getSplitIteration()