16 cl::desc(
"Disable scheduling addi instruction before" 19 bool PPCPreRASchedStrategy::biasAddiLoadCandidate(SchedCandidate &Cand,
20 SchedCandidate &TryCand,
26 return Inst.getOpcode() == PPC::ADDI || Inst.getOpcode() == PPC::ADDI8;
29 SchedCandidate &FirstCand = Zone.
isTop() ? TryCand : Cand;
30 SchedCandidate &SecondCand = Zone.
isTop() ? Cand : TryCand;
31 if (isADDIInstr(*FirstCand.SU->getInstr()) &&
32 SecondCand.SU->getInstr()->mayLoad()) {
33 TryCand.Reason =
Stall;
36 if (FirstCand.SU->getInstr()->mayLoad() &&
37 isADDIInstr(*SecondCand.SU->getInstr())) {
60 if (biasAddiLoadCandidate(Cand, TryCand, *Zone))
void leaveMBB() override
Tell the strategy that current MBB is done.
Each Scheduling boundary is associated with ready queues.
This class represents lattice values for constants.
void initialize(ScheduleDAGMI *Dag) override
Initialize the strategy after building the DAG for a new region.
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
SUnit * pickNode(bool &IsTopNode) override
Pick the next node to schedule.
virtual void enterMBB(MachineBasicBlock *MBB)
Tell the strategy that MBB is about to be processed.
void tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand, SchedBoundary *Zone) const override
Apply a set of heuristics to a new candidate.
SUnit * pickNode(bool &IsTopNode) override
Pick the next node to schedule.
Store the state used by GenericScheduler heuristics, required for the lifetime of one invocation of p...
virtual void tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand, SchedBoundary *Zone) const
Apply a set of heuristics to a new candidate.
Representation of each machine instruction.
void initialize(ScheduleDAGMI *Dag) override
Initialize the strategy after building the DAG for a new region.
void enterMBB(MachineBasicBlock *MBB) override
Tell the strategy that MBB is about to be processed.
virtual void leaveMBB()
Tell the strategy that current MBB is done.
static cl::opt< bool > DisableAddiLoadHeuristic("disable-ppc-sched-addi-load", cl::desc("Disable scheduling addi instruction before" "load for ppc"), cl::Hidden)
Scheduling unit. This is a node in the scheduling DAG.