Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions llvm/include/llvm/CodeGen/MachineScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1078,9 +1078,23 @@ class GenericSchedulerBase : public MachineSchedStrategy {
/// Represent the type of SchedCandidate found within a single queue.
/// pickNodeBidirectional depends on these listed by decreasing priority.
enum CandReason : uint8_t {
NoCand, Only1, PhysReg, RegExcess, RegCritical, Stall, Cluster, Weak,
RegMax, ResourceReduce, ResourceDemand, BotHeightReduce, BotPathReduce,
TopDepthReduce, TopPathReduce, NextDefUse, NodeOrder};
NoCand,
Only1,
PhysReg,
RegExcess,
RegCritical,
Stall,
Cluster,
Weak,
RegMax,
ResourceReduce,
ResourceDemand,
BotHeightReduce,
BotPathReduce,
TopDepthReduce,
TopPathReduce,
NodeOrder
};

#ifndef NDEBUG
static const char *getReasonStr(GenericSchedulerBase::CandReason Reason);
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/CodeGen/MachineScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,7 @@ void GenericSchedulerBase::setPolicy(CandPolicy &Policy, bool IsPostRA,
#ifndef NDEBUG
const char *GenericSchedulerBase::getReasonStr(
GenericSchedulerBase::CandReason Reason) {
// clang-format off
switch (Reason) {
case NoCand: return "NOCAND ";
case Only1: return "ONLY1 ";
Expand All @@ -3236,9 +3237,9 @@ const char *GenericSchedulerBase::getReasonStr(
case TopPathReduce: return "TOP-PATH ";
case BotHeightReduce:return "BOT-HEIGHT";
case BotPathReduce: return "BOT-PATH ";
case NextDefUse: return "DEF-USE ";
case NodeOrder: return "ORDER ";
};
// clang-format on
llvm_unreachable("Unknown reason!");
}

Expand Down