Skip to content

Commit db36039

Browse files
committed
Remove flag; this is now the default scheduler behavior
1 parent 252bce6 commit db36039

File tree

6 files changed

+16
-19
lines changed

6 files changed

+16
-19
lines changed

llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ namespace llvm {
124124
/// rescheduling).
125125
bool RemoveKillFlags;
126126

127-
/// True if regions with a single MI should be scheduled.
128-
bool ScheduleSingleMIRegions = false;
129-
130127
/// The standard DAG builder does not normally include terminators as DAG
131128
/// nodes because it does not create the necessary dependencies to prevent
132129
/// reordering. A specialized scheduler can override
@@ -291,11 +288,6 @@ namespace llvm {
291288
return Topo.IsReachable(SU, TargetSU);
292289
}
293290

294-
/// Whether regions with a single MI should be scheduled.
295-
bool shouldScheduleSingleMIRegions() const {
296-
return ScheduleSingleMIRegions;
297-
}
298-
299291
/// Returns an iterator to the top of the current scheduling region.
300292
MachineBasicBlock::iterator begin() const { return RegionBegin; }
301293

llvm/lib/CodeGen/MachineScheduler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,6 @@ void MachineSchedulerBase::scheduleRegions(ScheduleDAGInstrs &Scheduler,
770770

771771
MBBRegionsVector MBBRegions;
772772
getSchedRegions(&*MBB, MBBRegions, Scheduler.doMBBSchedRegionsTopDown());
773-
bool ScheduleSingleMI = Scheduler.shouldScheduleSingleMIRegions();
774773
for (const SchedRegion &R : MBBRegions) {
775774
MachineBasicBlock::iterator I = R.RegionBegin;
776775
MachineBasicBlock::iterator RegionEnd = R.RegionEnd;
@@ -781,7 +780,7 @@ void MachineSchedulerBase::scheduleRegions(ScheduleDAGInstrs &Scheduler,
781780
Scheduler.enterRegion(&*MBB, I, RegionEnd, NumRegionInstrs);
782781

783782
// Skip empty scheduling regions (0 or 1 schedulable instructions).
784-
if (I == RegionEnd || (!ScheduleSingleMI && I == std::prev(RegionEnd))) {
783+
if (I == RegionEnd) {
785784
// Close the current region. Bundle the terminator if needed.
786785
// This invalidates 'RegionEnd' and 'I'.
787786
Scheduler.exitRegion();

llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -759,10 +759,7 @@ GCNScheduleDAGMILive::GCNScheduleDAGMILive(
759759
MFI(*MF.getInfo<SIMachineFunctionInfo>()),
760760
StartingOccupancy(MFI.getOccupancy()), MinOccupancy(StartingOccupancy),
761761
RegionLiveOuts(this, /*IsLiveOut=*/true) {
762-
// We want regions with a single MI to be scheduled so that we can reason on
763-
// them correctly during scheduling stages that move MIs between regions (e.g.
764-
// rematerialization).
765-
ScheduleSingleMIRegions = true;
762+
766763
LLVM_DEBUG(dbgs() << "Starting occupancy is " << StartingOccupancy << ".\n");
767764
if (RelaxedOcc) {
768765
MinOccupancy = std::min(MFI.getMinAllowedOccupancy(), StartingOccupancy);

llvm/test/CodeGen/ARM/misched-branch-targets.mir

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# RUN: llc -o - -run-pass=machine-scheduler -misched=shuffle %s | FileCheck %s
2-
# RUN: llc -o - -passes=machine-scheduler -misched=shuffle %s | FileCheck %s
3-
# RUN: llc -o - -run-pass=postmisched %s | FileCheck %s
4-
# RUN: llc -o - -passes=postmisched %s | FileCheck %s
1+
# RUN: llc -o - -run-pass=machine-scheduler -misched=shuffle %s | FileCheck -check-prefixes=CHECK,CHECK-MISCHED %s
2+
# RUN: llc -o - -passes=machine-scheduler -misched=shuffle %s | FileCheck -check-prefixes=CHECK,CHECK-MISCHED %s
3+
# RUN: llc -o - -run-pass=postmisched %s | FileCheck -check-prefixes=CHECK,CHECK-POSTMISCHED %s
4+
# RUN: llc -o - -passes=postmisched %s | FileCheck -check-prefixes=CHECK,CHECK-POSTMISCHED %s
55

66
# REQUIRES: asserts
77
# -misched=shuffle is only available with assertions enabled
@@ -147,7 +147,8 @@ body: |
147147

148148
# CHECK-LABEL: name: foo_setjmp
149149
# CHECK: body:
150-
# CHECK: tBL 14 /* CC::al */, $noreg, @setjmp, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def $r0
150+
# CHECK-MISCHED: tBL 14 /* CC::al */, $noreg, @setjmp, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0, implicit-def $sp, implicit-def $r0
151+
# CHECK-POSTMISCHED: tBL 14 /* CC::al */, $noreg, @setjmp, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def $r0
151152
# CHECK-NEXT: t2BTI
152153

153154
---

llvm/test/CodeGen/PowerPC/pr47155-47156.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
; RUN: -stop-after=postmisched -debug-only=machine-scheduler 2>&1 >/dev/null | FileCheck %s
55

66
define void @pr47155() {
7+
; CHECK-LABEL: Machine code for function pr47155
78
; CHECK: *** Final schedule for %bb.0 ***
89
; CHECK: ********** MI Scheduling **********
910
; CHECK-NEXT: pr47155:%bb.0 entry
@@ -23,6 +24,7 @@ entry:
2324
}
2425

2526
define void @pr47156(ptr %fn) {
27+
; CHECK-LABEL: Machine code for function pr47156
2628
; CHECK: *** Final schedule for %bb.0 ***
2729
; CHECK: ********** MI Scheduling **********
2830
; CHECK-NEXT: pr47156:%bb.0 entry

llvm/test/CodeGen/X86/fake-use-scheduler.mir

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
#
1010
# CHECK: ********** MI Scheduling **********
1111
# CHECK-NEXT: foo:%bb.0 entry
12+
# CHECK-NEXT: From: $rax = COPY %5:gr64
13+
# CHECK-NEXT: To: RET 0, killed $rax
14+
# CHECK-NEXT: RegionInstrs: 1
15+
#
16+
# CHECK: ********** MI Scheduling **********
17+
# CHECK-NEXT: foo:%bb.0 entry
1218
# CHECK-NEXT: From: %0:gr64 = COPY $rdi
1319
# CHECK-NEXT: To: FAKE_USE %5:gr64
1420
# CHECK-NEXT: RegionInstrs: 7

0 commit comments

Comments
 (0)