[llvm-branch-commits] [llvm] [AMDGPU][Scheduler] Simplify scheduling revert logic (PR #177203)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jan 29 11:53:06 PST 2026
================
@@ -1773,66 +1775,56 @@ bool GCNSchedStage::mayCauseSpilling(unsigned WavesAfter) {
return false;
}
-void GCNSchedStage::revertScheduling() {
- LLVM_DEBUG(dbgs() << "Attempting to revert scheduling.\n");
- DAG.RegionEnd = DAG.RegionBegin;
- int SkippedDebugInstr = 0;
- for (MachineInstr *MI : Unsched) {
- if (MI->isDebugInstr()) {
- ++SkippedDebugInstr;
- continue;
- }
+void GCNSchedStage::modifyRegionSchedule(unsigned RegionIdx,
+ MachineBasicBlock *MBB,
+ ArrayRef<MachineInstr *> MIOrder) {
+ assert(std::distance(DAG.Regions[RegionIdx].first,
+ DAG.Regions[RegionIdx].second) ==
+ static_cast<long>(MIOrder.size()) &&
----------------
arsenm wrote:
Not sure why you need this cast to long, don't both of these return size_t?
https://github.com/llvm/llvm-project/pull/177203
More information about the llvm-branch-commits
mailing list