File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -965,7 +965,7 @@ void ScheduleDAGMI::moveInstruction(
965965
966966bool ScheduleDAGMI::checkSchedLimit () {
967967#if LLVM_ENABLE_ABI_BREAKING_CHECKS && !defined(NDEBUG)
968- if (( NumInstrsScheduled + 1 ) == MISchedCutoff && MISchedCutoff != ~0U ) {
968+ if (NumInstrsScheduled == MISchedCutoff && MISchedCutoff != ~0U ) {
969969 CurrentTop = CurrentBottom;
970970 return false ;
971971 }
@@ -1003,13 +1003,14 @@ void ScheduleDAGMI::schedule() {
10031003
10041004 bool IsTopNode = false ;
10051005 while (true ) {
1006+ if (!checkSchedLimit ())
1007+ break ;
1008+
10061009 LLVM_DEBUG (dbgs () << " ** ScheduleDAGMI::schedule picking next node\n " );
10071010 SUnit *SU = SchedImpl->pickNode (IsTopNode);
10081011 if (!SU) break ;
10091012
10101013 assert (!SU->isScheduled && " Node already scheduled" );
1011- if (!checkSchedLimit ())
1012- break ;
10131014
10141015 MachineInstr *MI = SU->getInstr ();
10151016 if (IsTopNode) {
@@ -1637,13 +1638,14 @@ void ScheduleDAGMILive::schedule() {
16371638
16381639 bool IsTopNode = false ;
16391640 while (true ) {
1641+ if (!checkSchedLimit ())
1642+ break ;
1643+
16401644 LLVM_DEBUG (dbgs () << " ** ScheduleDAGMILive::schedule picking next node\n " );
16411645 SUnit *SU = SchedImpl->pickNode (IsTopNode);
16421646 if (!SU) break ;
16431647
16441648 assert (!SU->isScheduled && " Node already scheduled" );
1645- if (!checkSchedLimit ())
1646- break ;
16471649
16481650 scheduleMI (SU, IsTopNode);
16491651
You can’t perform that action at this time.
0 commit comments