LLVM  14.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 
18 namespace llvm {
19 
20 /// A MachineSchedStrategy implementation for PowerPC pre RA scheduling.
22 public:
25 protected:
26  bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand,
27  SchedBoundary *Zone) const override;
28 
29 private:
30  bool biasAddiLoadCandidate(SchedCandidate &Cand,
31  SchedCandidate &TryCand,
32  SchedBoundary &Zone) const;
33 };
34 
35 /// A MachineSchedStrategy implementation for PowerPC post RA scheduling.
37 public:
40 
41 protected:
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
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::PPCPostRASchedStrategy::initialize
void initialize(ScheduleDAGMI *Dag) override
Initialize the strategy after building the DAG for a new region.
Definition: PPCMachineScheduler.cpp:242
llvm::PPCPostRASchedStrategy::pickNode
SUnit * pickNode(bool &IsTopNode) override
Pick the next node to schedule.
Definition: PPCMachineScheduler.cpp:247
llvm::PPCPreRASchedStrategy::PPCPreRASchedStrategy
PPCPreRASchedStrategy(const MachineSchedContext *C)
Definition: PPCMachineScheduler.h:23
llvm::PPCPreRASchedStrategy::tryCandidate
bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand, SchedBoundary *Zone) const override
Apply a set of heuristics to a new candidate.
Definition: PPCMachineScheduler.cpp:49
llvm::tgtok::Dag
@ Dag
Definition: TGLexer.h:50
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::PPCPostRASchedStrategy::enterMBB
void enterMBB(MachineBasicBlock *MBB) override
Tell the strategy that MBB is about to be processed.
Definition: PPCMachineScheduler.cpp:232
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
llvm::PPCPostRASchedStrategy::leaveMBB
void leaveMBB() override
Tell the strategy that current MBB is done.
Definition: PPCMachineScheduler.cpp:237
llvm::PostGenericScheduler
PostGenericScheduler - Interface to the scheduling algorithm used by ScheduleDAGMI.
Definition: MachineScheduler.h:1033
llvm::MachineSchedContext
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
Definition: MachineScheduler.h:120
llvm::ScheduleDAGMI
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
Definition: MachineScheduler.h:266
llvm::PPCPostRASchedStrategy::tryCandidate
bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand) override
Apply a set of heuristics to a new candidate for PostRA scheduling.
Definition: PPCMachineScheduler.cpp:177
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::PPCPreRASchedStrategy
A MachineSchedStrategy implementation for PowerPC pre RA scheduling.
Definition: PPCMachineScheduler.h:21
llvm::SchedBoundary
Each Scheduling boundary is associated with ready queues.
Definition: MachineScheduler.h:608
MachineScheduler.h
llvm::PPCPostRASchedStrategy
A MachineSchedStrategy implementation for PowerPC post RA scheduling.
Definition: PPCMachineScheduler.h:36
llvm::PPCPostRASchedStrategy::PPCPostRASchedStrategy
PPCPostRASchedStrategy(const MachineSchedContext *C)
Definition: PPCMachineScheduler.h:38
llvm::SUnit
Scheduling unit. This is a node in the scheduling DAG.
Definition: ScheduleDAG.h:242
llvm::GenericScheduler
GenericScheduler shrinks the unscheduled zone using heuristics to balance the schedule.
Definition: MachineScheduler.h:951
llvm::PPCPostRASchedStrategy::biasAddiCandidate
bool biasAddiCandidate(SchedCandidate &Cand, SchedCandidate &TryCand) const
Definition: PPCMachineScheduler.cpp:165