Lines Matching refs:Cand
2415 void GenericSchedulerBase::traceCandidate(const SchedCandidate &Cand) { in traceCandidate() argument
2419 switch (Cand.Reason) { in traceCandidate()
2423 P = Cand.RPDelta.Excess; in traceCandidate()
2426 P = Cand.RPDelta.CriticalMax; in traceCandidate()
2429 P = Cand.RPDelta.CurrentMax; in traceCandidate()
2432 ResIdx = Cand.Policy.ReduceResIdx; in traceCandidate()
2435 ResIdx = Cand.Policy.DemandResIdx; in traceCandidate()
2438 Latency = Cand.SU->getDepth(); in traceCandidate()
2441 Latency = Cand.SU->getHeight(); in traceCandidate()
2444 Latency = Cand.SU->getHeight(); in traceCandidate()
2447 Latency = Cand.SU->getDepth(); in traceCandidate()
2450 dbgs() << " Cand SU(" << Cand.SU->NodeNum << ") " << getReasonStr(Cand.Reason); in traceCandidate()
2471 GenericSchedulerBase::SchedCandidate &Cand, in tryLess() argument
2478 if (Cand.Reason > Reason) in tryLess()
2479 Cand.Reason = Reason; in tryLess()
2487 GenericSchedulerBase::SchedCandidate &Cand, in tryGreater() argument
2494 if (Cand.Reason > Reason) in tryGreater()
2495 Cand.Reason = Reason; in tryGreater()
2502 GenericSchedulerBase::SchedCandidate &Cand, in tryLatency() argument
2505 if (Cand.SU->getDepth() > Zone.getScheduledLatency()) { in tryLatency()
2506 if (tryLess(TryCand.SU->getDepth(), Cand.SU->getDepth(), in tryLatency()
2507 TryCand, Cand, GenericSchedulerBase::TopDepthReduce)) in tryLatency()
2510 if (tryGreater(TryCand.SU->getHeight(), Cand.SU->getHeight(), in tryLatency()
2511 TryCand, Cand, GenericSchedulerBase::TopPathReduce)) in tryLatency()
2514 if (Cand.SU->getHeight() > Zone.getScheduledLatency()) { in tryLatency()
2515 if (tryLess(TryCand.SU->getHeight(), Cand.SU->getHeight(), in tryLatency()
2516 TryCand, Cand, GenericSchedulerBase::BotHeightReduce)) in tryLatency()
2519 if (tryGreater(TryCand.SU->getDepth(), Cand.SU->getDepth(), in tryLatency()
2520 TryCand, Cand, GenericSchedulerBase::BotPathReduce)) in tryLatency()
2531 static void tracePick(const GenericSchedulerBase::SchedCandidate &Cand) { in tracePick() argument
2532 tracePick(Cand.Reason, Cand.AtTop); in tracePick()
2680 GenericSchedulerBase::SchedCandidate &Cand, in tryPressure() argument
2686 if (tryGreater(TryP.getUnitInc() < 0, CandP.getUnitInc() < 0, TryCand, Cand, in tryPressure()
2692 if (Cand.AtTop != TryCand.AtTop) in tryPressure()
2700 return tryLess(TryP.getUnitInc(), CandP.getUnitInc(), TryCand, Cand, in tryPressure()
2713 return tryGreater(TryRank, CandRank, TryCand, Cand, Reason); in tryPressure()
2748 void GenericScheduler::initCandidate(SchedCandidate &Cand, SUnit *SU, in initCandidate() argument
2752 Cand.SU = SU; in initCandidate()
2753 Cand.AtTop = AtTop; in initCandidate()
2757 Cand.SU->getInstr(), in initCandidate()
2758 Cand.RPDelta, in initCandidate()
2764 Cand.SU->getInstr(), in initCandidate()
2765 &DAG->getPressureDiff(Cand.SU), in initCandidate()
2766 Cand.RPDelta, in initCandidate()
2771 Cand.SU->getInstr(), in initCandidate()
2772 DAG->getPressureDiff(Cand.SU), in initCandidate()
2773 Cand.RPDelta, in initCandidate()
2779 DEBUG(if (Cand.RPDelta.Excess.isValid()) in initCandidate()
2780 dbgs() << " Try SU(" << Cand.SU->NodeNum << ") " in initCandidate()
2781 << TRI->getRegPressureSetName(Cand.RPDelta.Excess.getPSet()) in initCandidate()
2782 << ":" << Cand.RPDelta.Excess.getUnitInc() << "\n"); in initCandidate()
2795 void GenericScheduler::tryCandidate(SchedCandidate &Cand, in tryCandidate() argument
2799 if (!Cand.isValid()) { in tryCandidate()
2805 biasPhysRegCopy(Cand.SU, Cand.AtTop), in tryCandidate()
2806 TryCand, Cand, PhysRegCopy)) in tryCandidate()
2811 Cand.RPDelta.Excess, in tryCandidate()
2812 TryCand, Cand, RegExcess, TRI, in tryCandidate()
2818 Cand.RPDelta.CriticalMax, in tryCandidate()
2819 TryCand, Cand, RegCritical, TRI, in tryCandidate()
2835 tryLatency(TryCand, Cand, *Zone)) in tryCandidate()
2840 Zone->getLatencyStallCycles(Cand.SU), TryCand, Cand, Stall)) in tryCandidate()
2851 Cand.AtTop ? DAG->getNextClusterSucc() : DAG->getNextClusterPred(); in tryCandidate()
2855 Cand.SU == CandNextClusterSU, in tryCandidate()
2856 TryCand, Cand, Cluster)) in tryCandidate()
2862 getWeakLeft(Cand.SU, Cand.AtTop), in tryCandidate()
2863 TryCand, Cand, Weak)) in tryCandidate()
2869 Cand.RPDelta.CurrentMax, in tryCandidate()
2870 TryCand, Cand, RegMax, TRI, in tryCandidate()
2877 if (tryLess(TryCand.ResDelta.CritResources, Cand.ResDelta.CritResources, in tryCandidate()
2878 TryCand, Cand, ResourceReduce)) in tryCandidate()
2881 Cand.ResDelta.DemandedResources, in tryCandidate()
2882 TryCand, Cand, ResourceDemand)) in tryCandidate()
2888 !Rem.IsAcyclicLatencyLimited && tryLatency(TryCand, Cand, *Zone)) in tryCandidate()
2894 if (tryGreater(Zone->isNextSU(TryCand.SU), Zone->isNextSU(Cand.SU), in tryCandidate()
2895 TryCand, Cand, NextDefUse)) in tryCandidate()
2899 if ((Zone->isTop() && TryCand.SU->NodeNum < Cand.SU->NodeNum) in tryCandidate()
2900 || (!Zone->isTop() && TryCand.SU->NodeNum > Cand.SU->NodeNum)) { in tryCandidate()
2914 SchedCandidate &Cand) { in pickNodeFromQueue() argument
2924 SchedBoundary *ZoneArg = Cand.AtTop == TryCand.AtTop ? &Zone : nullptr; in pickNodeFromQueue()
2925 tryCandidate(Cand, TryCand, ZoneArg); in pickNodeFromQueue()
2930 Cand.setBest(TryCand); in pickNodeFromQueue()
2931 DEBUG(traceCandidate(Cand)); in pickNodeFromQueue()
3002 SchedCandidate Cand = BotCand; in pickNodeBidirectional() local
3004 tryCandidate(Cand, TopCand, nullptr); in pickNodeBidirectional()
3006 Cand.setBest(TopCand); in pickNodeBidirectional()
3007 DEBUG(traceCandidate(Cand)); in pickNodeBidirectional()
3010 IsTopNode = Cand.AtTop; in pickNodeBidirectional()
3011 tracePick(Cand); in pickNodeBidirectional()
3012 return Cand.SU; in pickNodeBidirectional()
3174 void PostGenericScheduler::tryCandidate(SchedCandidate &Cand, in tryCandidate() argument
3178 if (!Cand.isValid()) { in tryCandidate()
3185 Top.getLatencyStallCycles(Cand.SU), TryCand, Cand, Stall)) in tryCandidate()
3189 if (tryLess(TryCand.ResDelta.CritResources, Cand.ResDelta.CritResources, in tryCandidate()
3190 TryCand, Cand, ResourceReduce)) in tryCandidate()
3193 Cand.ResDelta.DemandedResources, in tryCandidate()
3194 TryCand, Cand, ResourceDemand)) in tryCandidate()
3198 if (Cand.Policy.ReduceLatency && tryLatency(TryCand, Cand, Top)) { in tryCandidate()
3203 if (TryCand.SU->NodeNum < Cand.SU->NodeNum) in tryCandidate()
3207 void PostGenericScheduler::pickNodeFromQueue(SchedCandidate &Cand) { in pickNodeFromQueue() argument
3210 SchedCandidate TryCand(Cand.Policy); in pickNodeFromQueue()
3214 tryCandidate(Cand, TryCand); in pickNodeFromQueue()
3216 Cand.setBest(TryCand); in pickNodeFromQueue()
3217 DEBUG(traceCandidate(Cand)); in pickNodeFromQueue()