aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineSchedulerInternal.h
blob: a6125488f98108938773902e29869b50c6ed211b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef RCC_LIB_CODEGEN_MACHINESCHEDULERINTERNAL_H
#define RCC_LIB_CODEGEN_MACHINESCHEDULERINTERNAL_H

#include "rcc/CodeGen/MachineAnalyses.h"
#include "rcc/CodeGen/MachineLiveness.h"
#include "rcc/CodeGen/MachineScheduler.h"
#include "rcc/CodeGen/ScheduleDAG.h"
#include "rcc/Support/Error.h"

#include <vector>

namespace rcc {

class MachineBasicBlock;
class MachineFunction;
class TargetDescription;
class TargetSchedulingModel;
struct MachineSchedulingRunResult final {
  bool Changed = false;
  std::vector<MachineBasicBlock *> ChangedBlocks;
};

[[nodiscard]] Expected<MachineSchedulingRunResult> runMachineScheduler(
    MachineFunction &Function, const TargetDescription &Target, const TargetSchedulingModel &Model,
    ScheduleDAGMode Mode, const LiveVariablesAnalysis::Result &Liveness,
    const MachineBlockFrequencyAnalysis::Result &Frequencies, MachineSchedulerOptions Options);

} // namespace rcc

#endif // RCC_LIB_CODEGEN_MACHINESCHEDULERINTERNAL_H