blob: ea6d3ffbb262b70f3a7cc42c94aafcebde6fac33 [file] [log] [blame]
QingShan Zhang5321dcd2019-03-27 03:50:16 +00001//===- 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
16#include "llvm/CodeGen/MachineScheduler.h"
17
18namespace llvm {
19
20/// A MachineSchedStrategy implementation for PowerPC pre RA scheduling.
21class PPCPreRASchedStrategy : public GenericScheduler {
22public:
23 PPCPreRASchedStrategy(const MachineSchedContext *C) :
24 GenericScheduler(C) {}
25};
26
27/// A MachineSchedStrategy implementation for PowerPC post RA scheduling.
28class PPCPostRASchedStrategy : public PostGenericScheduler {
29public:
30 PPCPostRASchedStrategy(const MachineSchedContext *C) :
31 PostGenericScheduler(C) {}
32
33protected:
34 void initialize(ScheduleDAGMI *Dag) override;
35 SUnit *pickNode(bool &IsTopNode) override;
36 void enterMBB(MachineBasicBlock *MBB) override;
37 void leaveMBB() override;
38};
39
40} // end namespace llvm
41
42#endif // LLVM_LIB_TARGET_POWERPC_POWERPCMACHINESCHEDULER_H