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 16 #include "llvm/CodeGen/MachineScheduler.h" 17 18 namespace llvm { 19 20 /// A MachineSchedStrategy implementation for PowerPC pre RA scheduling. 21 class PPCPreRASchedStrategy : public GenericScheduler { 22 public: 23 PPCPreRASchedStrategy(const MachineSchedContext *C) : 24 GenericScheduler(C) {} 25 }; 26 27 /// A MachineSchedStrategy implementation for PowerPC post RA scheduling. 28 class PPCPostRASchedStrategy : public PostGenericScheduler { 29 public: 30 PPCPostRASchedStrategy(const MachineSchedContext *C) : 31 PostGenericScheduler(C) {} 32 33 protected: 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 43