aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2025-02-24 15:45:07 -0800
committerPhilip Reames <listmail@philipreames.com>2025-02-24 16:04:30 -0800
commit49c31201278ae5949694ed78b69ffbbca6a1826a (patch)
tree51e2aaa2fbb5345f4779f7ae506202a0e3e9d5e7 /llvm/lib/CodeGen/MachineScheduler.cpp
parentccbb8882ac75e73e23f31ad60588a2914ebeef04 (diff)
downloadllvm-49c31201278ae5949694ed78b69ffbbca6a1826a.zip
llvm-49c31201278ae5949694ed78b69ffbbca6a1826a.tar.gz
llvm-49c31201278ae5949694ed78b69ffbbca6a1826a.tar.bz2
[MachineSched] Add a first valid reason [nfc]
For debugging, distinguish the first valid candidate encountered and a preference decision driven by node number.
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 0da7535..bd7eeca 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -3267,6 +3267,7 @@ const char *GenericSchedulerBase::getReasonStr(
case BotHeightReduce:return "BOT-HEIGHT";
case BotPathReduce: return "BOT-PATH ";
case NodeOrder: return "ORDER ";
+ case FirstValid: return "FIRST ";
};
// clang-format on
llvm_unreachable("Unknown reason!");
@@ -3688,7 +3689,7 @@ bool GenericScheduler::tryCandidate(SchedCandidate &Cand,
SchedBoundary *Zone) const {
// Initialize the candidate if needed.
if (!Cand.isValid()) {
- TryCand.Reason = NodeOrder;
+ TryCand.Reason = FirstValid;
return true;
}
@@ -4103,7 +4104,7 @@ bool PostGenericScheduler::tryCandidate(SchedCandidate &Cand,
SchedCandidate &TryCand) {
// Initialize the candidate if needed.
if (!Cand.isValid()) {
- TryCand.Reason = NodeOrder;
+ TryCand.Reason = FirstValid;
return true;
}