Coverage Report

Created: 2018-11-13 17:19

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/CodeGen/SchedulerRegistry.h
Line
Count
Source
1
//===- llvm/CodeGen/SchedulerRegistry.h -------------------------*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file contains the implementation for instruction scheduler function
11
// pass registry (RegisterScheduler).
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CODEGEN_SCHEDULERREGISTRY_H
16
#define LLVM_CODEGEN_SCHEDULERREGISTRY_H
17
18
#include "llvm/CodeGen/MachinePassRegistry.h"
19
#include "llvm/Support/CodeGen.h"
20
21
namespace llvm {
22
23
//===----------------------------------------------------------------------===//
24
///
25
/// RegisterScheduler class - Track the registration of instruction schedulers.
26
///
27
//===----------------------------------------------------------------------===//
28
29
class ScheduleDAGSDNodes;
30
class SelectionDAGISel;
31
32
class RegisterScheduler
33
    : public MachinePassRegistryNode<
34
          ScheduleDAGSDNodes *(*)(SelectionDAGISel *, CodeGenOpt::Level)> {
35
public:
36
  using FunctionPassCtor = ScheduleDAGSDNodes *(*)(SelectionDAGISel*,
37
                                                   CodeGenOpt::Level);
38
39
  static MachinePassRegistry<FunctionPassCtor> Registry;
40
41
  RegisterScheduler(const char *N, const char *D, FunctionPassCtor C)
42
615k
      : MachinePassRegistryNode(N, D, C) {
43
615k
    Registry.Add(this);
44
615k
  }
45
615k
  ~RegisterScheduler() { Registry.Remove(this); }
46
47
48
  // Accessors.
49
520k
  RegisterScheduler *getNext() const {
50
520k
    return (RegisterScheduler *)MachinePassRegistryNode::getNext();
51
520k
  }
52
53
95.3k
  static RegisterScheduler *getList() {
54
95.3k
    return (RegisterScheduler *)Registry.getList();
55
95.3k
  }
56
57
190k
  static void setListener(MachinePassRegistryListener<FunctionPassCtor> *L) {
58
190k
    Registry.setListener(L);
59
190k
  }
60
};
61
62
/// createBURRListDAGScheduler - This creates a bottom up register usage
63
/// reduction list scheduler.
64
ScheduleDAGSDNodes *createBURRListDAGScheduler(SelectionDAGISel *IS,
65
                                               CodeGenOpt::Level OptLevel);
66
67
/// createBURRListDAGScheduler - This creates a bottom up list scheduler that
68
/// schedules nodes in source code order when possible.
69
ScheduleDAGSDNodes *createSourceListDAGScheduler(SelectionDAGISel *IS,
70
                                                 CodeGenOpt::Level OptLevel);
71
72
/// createHybridListDAGScheduler - This creates a bottom up register pressure
73
/// aware list scheduler that make use of latency information to avoid stalls
74
/// for long latency instructions in low register pressure mode. In high
75
/// register pressure mode it schedules to reduce register pressure.
76
ScheduleDAGSDNodes *createHybridListDAGScheduler(SelectionDAGISel *IS,
77
                                                 CodeGenOpt::Level);
78
79
/// createILPListDAGScheduler - This creates a bottom up register pressure
80
/// aware list scheduler that tries to increase instruction level parallelism
81
/// in low register pressure mode. In high register pressure mode it schedules
82
/// to reduce register pressure.
83
ScheduleDAGSDNodes *createILPListDAGScheduler(SelectionDAGISel *IS,
84
                                              CodeGenOpt::Level);
85
86
/// createFastDAGScheduler - This creates a "fast" scheduler.
87
///
88
ScheduleDAGSDNodes *createFastDAGScheduler(SelectionDAGISel *IS,
89
                                           CodeGenOpt::Level OptLevel);
90
91
/// createVLIWDAGScheduler - Scheduler for VLIW targets. This creates top down
92
/// DFA driven list scheduler with clustering heuristic to control
93
/// register pressure.
94
ScheduleDAGSDNodes *createVLIWDAGScheduler(SelectionDAGISel *IS,
95
                                           CodeGenOpt::Level OptLevel);
96
/// createDefaultScheduler - This creates an instruction scheduler appropriate
97
/// for the target.
98
ScheduleDAGSDNodes *createDefaultScheduler(SelectionDAGISel *IS,
99
                                           CodeGenOpt::Level OptLevel);
100
101
/// createDAGLinearizer - This creates a "no-scheduling" scheduler which
102
/// linearize the DAG using topological order.
103
ScheduleDAGSDNodes *createDAGLinearizer(SelectionDAGISel *IS,
104
                                        CodeGenOpt::Level OptLevel);
105
106
} // end namespace llvm
107
108
#endif // LLVM_CODEGEN_SCHEDULERREGISTRY_H