Lines Matching refs:Src
190 return Src->mayReadFromMemory() && Dst->mayReadFromMemory(); in isInput()
196 return Src->mayWriteToMemory() && Dst->mayWriteToMemory(); in isOutput()
202 return Src->mayWriteToMemory() && Dst->mayReadFromMemory(); in isFlow()
208 return Src->mayReadFromMemory() && Dst->mayWriteToMemory(); in isAnti()
710 void DependenceAnalysis::establishNestingLevels(const Instruction *Src, in establishNestingLevels() argument
712 const BasicBlock *SrcBlock = Src->getParent(); in establishNestingLevels()
786 const SCEV *Src = Pair->Src; in removeMatchingExtensions() local
788 if ((isa<SCEVZeroExtendExpr>(Src) && isa<SCEVZeroExtendExpr>(Dst)) || in removeMatchingExtensions()
789 (isa<SCEVSignExtendExpr>(Src) && isa<SCEVSignExtendExpr>(Dst))) { in removeMatchingExtensions()
790 const SCEVCastExpr *SrcCast = cast<SCEVCastExpr>(Src); in removeMatchingExtensions()
793 Pair->Src = SrcCast->getOperand(); in removeMatchingExtensions()
802 bool DependenceAnalysis::checkSrcSubscript(const SCEV *Src, in checkSrcSubscript() argument
805 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Src); in checkSrcSubscript()
807 return isLoopInvariant(Src, LoopNest); in checkSrcSubscript()
839 DependenceAnalysis::classifyPair(const SCEV *Src, const Loop *SrcLoopNest, in classifyPair() argument
844 if (!checkSrcSubscript(Src, SrcLoopNest, SrcLoops)) in classifyPair()
955 bool DependenceAnalysis::testZIV(const SCEV *Src, in testZIV() argument
958 DEBUG(dbgs() << " src = " << *Src << "\n"); in testZIV()
961 if (isKnownPredicate(CmpInst::ICMP_EQ, Src, Dst)) { in testZIV()
965 if (isKnownPredicate(CmpInst::ICMP_NE, Src, Dst)) { in testZIV()
2034 bool DependenceAnalysis::testSIV(const SCEV *Src, in testSIV() argument
2040 DEBUG(dbgs() << " src = " << *Src << "\n"); in testSIV()
2042 const SCEVAddRecExpr *SrcAddRec = dyn_cast<SCEVAddRecExpr>(Src); in testSIV()
2064 gcdMIVtest(Src, Dst, Result) || in testSIV()
2075 gcdMIVtest(Src, Dst, Result); in testSIV()
2080 const SCEV *SrcConst = Src; in testSIV()
2085 gcdMIVtest(Src, Dst, Result); in testSIV()
2105 bool DependenceAnalysis::testRDIV(const SCEV *Src, in testRDIV() argument
2118 DEBUG(dbgs() << " src = " << *Src << "\n"); in testRDIV()
2120 const SCEVAddRecExpr *SrcAddRec = dyn_cast<SCEVAddRecExpr>(Src); in testRDIV()
2149 SrcConst = Src; in testRDIV()
2162 gcdMIVtest(Src, Dst, Result) || in testRDIV()
2172 bool DependenceAnalysis::testMIV(const SCEV *Src, in testMIV() argument
2176 DEBUG(dbgs() << " src = " << *Src << "\n"); in testMIV()
2179 return gcdMIVtest(Src, Dst, Result) || in testMIV()
2180 banerjeeMIVtest(Src, Dst, Loops, Result); in testMIV()
2214 bool DependenceAnalysis::gcdMIVtest(const SCEV *Src, in gcdMIVtest() argument
2219 unsigned BitWidth = SE->getTypeSizeInBits(Src->getType()); in gcdMIVtest()
2226 const SCEV *Coefficients = Src; in gcdMIVtest()
2319 Coefficients = Src; in gcdMIVtest()
2327 const SCEV *Inner = Src; in gcdMIVtest()
2428 bool DependenceAnalysis::banerjeeMIVtest(const SCEV *Src, in banerjeeMIVtest() argument
2434 DEBUG(dbgs() << " Src = " << *Src << '\n'); in banerjeeMIVtest()
2436 CoefficientInfo *A = collectCoeffInfo(Src, true, A0); in banerjeeMIVtest()
2972 bool DependenceAnalysis::propagate(const SCEV *&Src, in propagate() argument
2982 Result |= propagateDistance(Src, Dst, Constraints[LI], Consistent); in propagate()
2984 Result |= propagateLine(Src, Dst, Constraints[LI], Consistent); in propagate()
2986 Result |= propagatePoint(Src, Dst, Constraints[LI]); in propagate()
2997 bool DependenceAnalysis::propagateDistance(const SCEV *&Src, in propagateDistance() argument
3002 DEBUG(dbgs() << "\t\tSrc is " << *Src << "\n"); in propagateDistance()
3003 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateDistance()
3007 Src = SE->getMinusSCEV(Src, DA_K); in propagateDistance()
3008 Src = zeroCoefficient(Src, CurLoop); in propagateDistance()
3009 DEBUG(dbgs() << "\t\tnew Src is " << *Src << "\n"); in propagateDistance()
3024 bool DependenceAnalysis::propagateLine(const SCEV *&Src, in propagateLine() argument
3033 DEBUG(dbgs() << "\t\tSrc = " << *Src << "\n"); in propagateLine()
3045 Src = SE->getMinusSCEV(Src, SE->getMulExpr(AP_K, SE->getConstant(CdivB))); in propagateLine()
3047 if (!findCoefficient(Src, CurLoop)->isZero()) in propagateLine()
3058 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateLine()
3059 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, SE->getConstant(CdivA))); in propagateLine()
3060 Src = zeroCoefficient(Src, CurLoop); in propagateLine()
3072 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateLine()
3073 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, SE->getConstant(CdivA))); in propagateLine()
3074 Src = zeroCoefficient(Src, CurLoop); in propagateLine()
3081 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagateLine()
3082 Src = SE->getMulExpr(Src, A); in propagateLine()
3084 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, C)); in propagateLine()
3085 Src = zeroCoefficient(Src, CurLoop); in propagateLine()
3090 DEBUG(dbgs() << "\t\tnew Src = " << *Src << "\n"); in propagateLine()
3099 bool DependenceAnalysis::propagatePoint(const SCEV *&Src, in propagatePoint() argument
3103 const SCEV *A_K = findCoefficient(Src, CurLoop); in propagatePoint()
3107 DEBUG(dbgs() << "\t\tSrc is " << *Src << "\n"); in propagatePoint()
3108 Src = SE->getAddExpr(Src, SE->getMinusSCEV(XA_K, YAP_K)); in propagatePoint()
3109 Src = zeroCoefficient(Src, CurLoop); in propagatePoint()
3110 DEBUG(dbgs() << "\t\tnew Src is " << *Src << "\n"); in propagatePoint()
3197 Dependence *DependenceAnalysis::depends(Instruction *Src, in depends() argument
3200 if (Src == Dst) in depends()
3203 if ((!Src->mayReadFromMemory() && !Src->mayWriteToMemory()) || in depends()
3208 if (!isLoadOrStore(Src) || !isLoadOrStore(Dst)) { in depends()
3211 return new Dependence(Src, Dst); in depends()
3214 Value *SrcPtr = getPointerOperand(Src); in depends()
3222 return new Dependence(Src, Dst); in depends()
3232 establishNestingLevels(Src, Dst); in depends()
3236 FullDependence Result(Src, Dst, PossiblyLoopIndependent, CommonLevels); in depends()
3251 isLoopInvariant(SrcPtrSCEV, LI->getLoopFor(Src->getParent())) && in depends()
3264 Pair[P].Src = SE->getSCEV(*SrcIdx); in depends()
3274 Pair[0].Src = SrcSCEV; in depends()
3284 classifyPair(Pair[P].Src, LI->getLoopFor(Src->getParent()), in depends()
3290 DEBUG(dbgs() << "\tsrc = " << *Pair[P].Src << "\n"); in depends()
3361 collectCommonLoops(Pair[SI].Src, in depends()
3362 LI->getLoopFor(Src->getParent()), in depends()
3414 if (testZIV(Pair[SI].Src, Pair[SI].Dst, Result)) in depends()
3421 if (testSIV(Pair[SI].Src, Pair[SI].Dst, Level, in depends()
3428 if (testRDIV(Pair[SI].Src, Pair[SI].Dst, Result)) in depends()
3433 if (testMIV(Pair[SI].Src, Pair[SI].Dst, Pair[SI].Loops, Result)) in depends()
3470 if (testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, in depends()
3491 if (propagate(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops, in depends()
3496 classifyPair(Pair[SJ].Src, LI->getLoopFor(Src->getParent()), in depends()
3502 if (testZIV(Pair[SJ].Src, Pair[SJ].Dst, Result)) in depends()
3525 if (testRDIV(Pair[SJ].Src, Pair[SJ].Dst, Result)) in depends()
3538 if (testMIV(Pair[SJ].Src, Pair[SJ].Dst, Pair[SJ].Loops, Result)) in depends()
3648 Instruction *Src = Dep->getSrc(); in getSplitIteration() local
3650 assert(Src->mayReadFromMemory() || Src->mayWriteToMemory()); in getSplitIteration()
3652 assert(isLoadOrStore(Src)); in getSplitIteration()
3654 Value *SrcPtr = getPointerOperand(Src); in getSplitIteration()
3660 establishNestingLevels(Src, Dst); in getSplitIteration()
3662 FullDependence Result(Src, Dst, false, CommonLevels); in getSplitIteration()
3673 isLoopInvariant(SrcPtrSCEV, LI->getLoopFor(Src->getParent())) && in getSplitIteration()
3685 Pair[P].Src = SE->getSCEV(*SrcIdx); in getSplitIteration()
3692 Pair[0].Src = SrcSCEV; in getSplitIteration()
3702 classifyPair(Pair[P].Src, LI->getLoopFor(Src->getParent()), in getSplitIteration()
3716 collectCommonLoops(Pair[SI].Src, in getSplitIteration()
3717 LI->getLoopFor(Src->getParent()), in getSplitIteration()
3758 (void) testSIV(Pair[SI].Src, Pair[SI].Dst, Level, in getSplitIteration()
3797 (void) testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, in getSplitIteration()
3810 if (propagate(Pair[SJ].Src, Pair[SJ].Dst, in getSplitIteration()
3813 classifyPair(Pair[SJ].Src, LI->getLoopFor(Src->getParent()), in getSplitIteration()