Skip to content

Commit 0f41fe8

Browse files
committed
Update comment in machine scheduler
1 parent db36039 commit 0f41fe8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/CodeGen/MachineScheduler.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,10 @@ void MachineSchedulerBase::scheduleRegions(ScheduleDAGInstrs &Scheduler,
779779
// it. Perhaps it still needs to be bundled.
780780
Scheduler.enterRegion(&*MBB, I, RegionEnd, NumRegionInstrs);
781781

782-
// Skip empty scheduling regions (0 or 1 schedulable instructions).
782+
// Skip empty scheduling regions but include single-MI regions; we want
783+
// those to be scheduled so that backends which move MIs across regions
784+
// during scheduling can reason about and schedule those regions
785+
// correctly.
783786
if (I == RegionEnd) {
784787
// Close the current region. Bundle the terminator if needed.
785788
// This invalidates 'RegionEnd' and 'I'.

0 commit comments

Comments
 (0)