LLVM  9.0.0svn
Go to the documentation of this file.
1 //===- PPCMachineScheduler.h - Custom PowerPC MI scheduler --*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Custom PowerPC MI scheduler.
10 //
11 //===----------------------------------------------------------------------===//
18 namespace llvm {
20 /// A MachineSchedStrategy implementation for PowerPC pre RA scheduling.
22 public:
24  GenericScheduler(C) {}
25 protected:
26  void tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand,
27  SchedBoundary *Zone) const override;
28 private:
29  bool biasAddiLoadCandidate(SchedCandidate &Cand,
30  SchedCandidate &TryCand,
31  SchedBoundary &Zone) const;
32 };
34 /// A MachineSchedStrategy implementation for PowerPC post RA scheduling.
36 public:
40 protected:
41  void initialize(ScheduleDAGMI *Dag) override;
42  SUnit *pickNode(bool &IsTopNode) override;
43  void enterMBB(MachineBasicBlock *MBB) override;
44  void leaveMBB() override;
45 };
47 } // end namespace llvm
uint64_t CallInst * C
PPCPreRASchedStrategy(const MachineSchedContext *C)
Each Scheduling boundary is associated with ready queues.
PostGenericScheduler - Interface to the scheduling algorithm used by ScheduleDAGMI.
This class represents lattice values for constants.
Definition: AllocatorList.h:23
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
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.
PPCPostRASchedStrategy(const MachineSchedContext *C)
Store the state used by GenericScheduler heuristics, required for the lifetime of one invocation of p...
GenericScheduler shrinks the unscheduled zone using heuristics to balance the schedule.
void initialize(ScheduleDAGMI *dag) override
Initialize the strategy after building the DAG for a new region.
A MachineSchedStrategy implementation for PowerPC post RA scheduling.
virtual void leaveMBB()
Tell the strategy that current MBB is done.
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
SUnit * pickNode(bool &IsTopNode) override
Pick the best node to balance the schedule. Implements MachineSchedStrategy.
A MachineSchedStrategy implementation for PowerPC pre RA scheduling.
Scheduling unit. This is a node in the scheduling DAG.
Definition: ScheduleDAG.h:242