Skip to content

[MISched][NFC] Remove unused heuristic NextDefUse from enum #125879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2025
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