LLVM 24.0.0git
PPCMachineScheduler.h
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//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_POWERPC_POWERPCMACHINESCHEDULER_H
14#define LLVM_LIB_TARGET_POWERPC_POWERPCMACHINESCHEDULER_H
15
17
18namespace llvm {
19
20/// A MachineSchedStrategy implementation for PowerPC pre RA scheduling.
22public:
25protected:
26 bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand,
27 SchedBoundary *Zone) const override;
28
29private:
30 bool biasAddiLoadCandidate(SchedCandidate &Cand,
31 SchedCandidate &TryCand,
32 SchedBoundary &Zone) const;
33};
34
35/// A MachineSchedStrategy implementation for PowerPC post RA scheduling.
37public:
40
41protected:
42 void initialize(ScheduleDAGMI *Dag) override;
43 SUnit *pickNode(bool &IsTopNode) override;
44 void enterMBB(MachineBasicBlock *MBB) override;
45 void leaveMBB() override;
46
47 bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand) override;
48 bool biasAddiCandidate(SchedCandidate &Cand, SchedCandidate &TryCand) const;
49};
50
51} // end namespace llvm
52
53#endif // LLVM_LIB_TARGET_POWERPC_POWERPCMACHINESCHEDULER_H
MachineBasicBlock & MBB
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
GenericScheduler(const MachineSchedContext *C)
SUnit * pickNode(bool &IsTopNode) override
Pick the next node to schedule.
PPCPostRASchedStrategy(const MachineSchedContext *C)
void enterMBB(MachineBasicBlock *MBB) override
Tell the strategy that MBB is about to be processed.
bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand) override
Apply a set of heuristics to a new candidate for PostRA scheduling.
bool biasAddiCandidate(SchedCandidate &Cand, SchedCandidate &TryCand) const
void leaveMBB() override
Tell the strategy that current MBB is done.
void initialize(ScheduleDAGMI *Dag) override
Initialize the strategy after building the DAG for a new region.
bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand, SchedBoundary *Zone) const override
Apply a set of heuristics to a new candidate.
PPCPreRASchedStrategy(const MachineSchedContext *C)
PostGenericScheduler(const MachineSchedContext *C)
Scheduling unit. This is a node in the scheduling DAG.
Each Scheduling boundary is associated with ready queues.
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
This is an optimization pass for GlobalISel generic memory operations.
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...