Lines Matching +full:max +full:- +full:reason

1 //===- PPCMachineScheduler.cpp - MI Scheduler for PowerPC -------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
15 DisableAddiLoadHeuristic("disable-ppc-sched-addi-load",
19 EnableAddiHeuristic("ppc-postra-bias-addi",
25 return Cand.SU->getInstr()->getOpcode() == PPC::ADDI || in isADDIInstr()
26 Cand.SU->getInstr()->getOpcode() == PPC::ADDI8; in isADDIInstr()
37 if (isADDIInstr(FirstCand) && SecondCand.SU->getInstr()->mayLoad()) { in biasAddiLoadCandidate()
38 TryCand.Reason = Stall; in biasAddiLoadCandidate()
41 if (FirstCand.SU->getInstr()->mayLoad() && isADDIInstr(SecondCand)) { in biasAddiLoadCandidate()
42 TryCand.Reason = NoCand; in biasAddiLoadCandidate()
56 TryCand.Reason = NodeOrder; in tryCandidate()
63 return TryCand.Reason != NoCand; in tryCandidate()
66 if (DAG->isTrackingPressure() && in tryCandidate()
68 RegExcess, TRI, DAG->MF)) in tryCandidate()
69 return TryCand.Reason != NoCand; in tryCandidate()
71 // Avoid increasing the max critical pressure in the scheduled region. in tryCandidate()
72 if (DAG->isTrackingPressure() && in tryCandidate()
74 TryCand, Cand, RegCritical, TRI, DAG->MF)) in tryCandidate()
75 return TryCand.Reason != NoCand; in tryCandidate()
81 // "tie-breaking" in nature. in tryCandidate()
87 if (Rem.IsAcyclicLatencyLimited && !Zone->getCurrMOps() && in tryCandidate()
89 return TryCand.Reason != NoCand; in tryCandidate()
92 if (tryLess(Zone->getLatencyStallCycles(TryCand.SU), in tryCandidate()
93 Zone->getLatencyStallCycles(Cand.SU), TryCand, Cand, Stall)) in tryCandidate()
94 return TryCand.Reason != NoCand; in tryCandidate()
100 // This is a best effort to set things up for a post-RA pass. Optimizations in tryCandidate()
104 Cand.AtTop ? DAG->getNextClusterSucc() : DAG->getNextClusterPred(); in tryCandidate()
106 TryCand.AtTop ? DAG->getNextClusterSucc() : DAG->getNextClusterPred(); in tryCandidate()
109 return TryCand.Reason != NoCand; in tryCandidate()
115 return TryCand.Reason != NoCand; in tryCandidate()
118 // Avoid increasing the max pressure of the entire region. in tryCandidate()
119 if (DAG->isTrackingPressure() && in tryCandidate()
121 Cand, RegMax, TRI, DAG->MF)) in tryCandidate()
122 return TryCand.Reason != NoCand; in tryCandidate()
129 return TryCand.Reason != NoCand; in tryCandidate()
133 return TryCand.Reason != NoCand; in tryCandidate()
139 return TryCand.Reason != NoCand; in tryCandidate()
142 if ((Zone->isTop() && TryCand.SU->NodeNum < Cand.SU->NodeNum) || in tryCandidate()
143 (!Zone->isTop() && TryCand.SU->NodeNum > Cand.SU->NodeNum)) { in tryCandidate()
144 TryCand.Reason = NodeOrder; in tryCandidate()
152 if (TryCand.Reason != NodeOrder && TryCand.Reason != NoCand) in tryCandidate()
159 return TryCand.Reason != NoCand; in tryCandidate()
162 return TryCand.Reason != NoCand; in tryCandidate()
171 TryCand.Reason = Stall; in biasAddiCandidate()
183 TryCand.Reason = NodeOrder; in tryCandidate()
190 return TryCand.Reason != NoCand; in tryCandidate()
193 if (tryGreater(TryCand.SU == DAG->getNextClusterSucc(), in tryCandidate()
194 Cand.SU == DAG->getNextClusterSucc(), TryCand, Cand, Cluster)) in tryCandidate()
195 return TryCand.Reason != NoCand; in tryCandidate()
200 return TryCand.Reason != NoCand; in tryCandidate()
204 return TryCand.Reason != NoCand; in tryCandidate()
208 return TryCand.Reason != NoCand; in tryCandidate()
212 if (TryCand.SU->NodeNum < Cand.SU->NodeNum) in tryCandidate()
213 TryCand.Reason = NodeOrder; in tryCandidate()
219 if (TryCand.Reason != NodeOrder && TryCand.Reason != NoCand) in tryCandidate()
227 return TryCand.Reason != NoCand; in tryCandidate()
229 return TryCand.Reason != NoCand; in tryCandidate()