LLVM
4.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
llvm.src
lib
Target
AMDGPU
GCNSchedStrategy.h
Go to the documentation of this file.
1
//===-- GCNSchedStrategy.h - GCN Scheduler Strategy -*- 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
/// \file
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_LIB_TARGET_AMDGPU_GCNSCHEDSTRATEGY_H
15
#define LLVM_LIB_TARGET_AMDGPU_GCNSCHEDSTRATEGY_H
16
17
#include "
llvm/CodeGen/MachineScheduler.h
"
18
19
namespace
llvm {
20
21
class
SIRegisterInfo;
22
23
/// This is a minimal scheduler strategy. The main difference between this
24
/// and the GenericScheduler is that GCNSchedStrategy uses different
25
/// heuristics to determine excess/critical pressure sets. Its goal is to
26
/// maximize kernel occupancy (i.e. maximum number of waves per simd).
27
class
GCNMaxOccupancySchedStrategy
:
public
GenericScheduler
{
28
29
SUnit
*pickNodeBidirectional(
bool
&IsTopNode);
30
31
void
pickNodeFromQueue(
SchedBoundary
&Zone,
const
CandPolicy
&ZonePolicy,
32
const
RegPressureTracker
&RPTracker,
33
SchedCandidate
&Cand);
34
35
void
initCandidate(
SchedCandidate
&Cand,
SUnit
*SU,
36
bool
AtTop,
const
RegPressureTracker
&RPTracker,
37
const
SIRegisterInfo
*SRI,
38
int
SGPRPressure,
int
VGPRPressure,
39
int
SGPRExcessLimit,
int
VGPRExcessLimit,
40
int
SGPRCriticalLimit,
int
VGPRCriticalLimit);
41
42
void
tryCandidate(
SchedCandidate
&Cand,
SchedCandidate
&TryCand,
43
SchedBoundary
*Zone,
const
SIRegisterInfo
*SRI,
44
unsigned
SGPRPressure,
unsigned
VGPRPressure);
45
46
public
:
47
GCNMaxOccupancySchedStrategy
(
const
MachineSchedContext
*
C
);
48
49
SUnit
*
pickNode
(
bool
&IsTopNode)
override
;
50
};
51
52
}
// End namespace llvm
53
54
#endif // GCNSCHEDSTRATEGY_H
llvm::GCNMaxOccupancySchedStrategy::pickNode
SUnit * pickNode(bool &IsTopNode) override
Pick the best node to balance the schedule. Implements MachineSchedStrategy.
Definition:
GCNSchedStrategy.cpp:272
llvm::SchedBoundary
Each Scheduling boundary is associated with ready queues.
Definition:
MachineScheduler.h:592
llvm::GCNMaxOccupancySchedStrategy
This is a minimal scheduler strategy.
Definition:
GCNSchedStrategy.h:27
llvm::SIRegisterInfo
Definition:
SIRegisterInfo.h:28
MachineScheduler.h
llvm::GenericSchedulerBase::SchedCandidate
Store the state used by GenericScheduler heuristics, required for the lifetime of one invocation of p...
Definition:
MachineScheduler.h:821
llvm::RegPressureTracker
Track the current register pressure at some position in the instruction stream, and remember the high...
Definition:
RegisterPressure.h:340
llvm::GenericSchedulerBase::CandPolicy
Policy for scheduling the next instruction in the candidate's zone.
Definition:
MachineScheduler.h:783
llvm::GenericScheduler
GenericScheduler shrinks the unscheduled zone using heuristics to balance the schedule.
Definition:
MachineScheduler.h:887
C
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
llvm::MachineSchedContext
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
Definition:
MachineScheduler.h:114
llvm::GCNMaxOccupancySchedStrategy::GCNMaxOccupancySchedStrategy
GCNMaxOccupancySchedStrategy(const MachineSchedContext *C)
Definition:
GCNSchedStrategy.cpp:26
llvm::SUnit
SUnit - Scheduling unit. This is a node in the scheduling DAG.
Definition:
ScheduleDAG.h:244
Generated on Wed Mar 8 2017 17:08:50 for LLVM by
1.8.6