Skip to content

Commit 61f0e1b

Browse files
Martien de Jongmartien-de-jong
authored andcommitted
[AIE] Try further heuristics if stage count is too high
1 parent 27e1d7f commit 61f0e1b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

llvm/lib/Target/AIE/AIEPostPipeliner.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -858,8 +858,14 @@ bool PostPipeliner::tryHeuristics() {
858858
<< "\n");
859859
if (scheduleFirstIteration(S) && scheduleOtherIterations(S)) {
860860
DEBUG_SUMMARY(dbgs() << " Strategy " << S.name() << " run=" << Run
861-
<< " found II=" << II << "\n");
862-
return true;
861+
<< " found schedule:\n");
862+
const bool Success = checkStages();
863+
DEBUG_SUMMARY(dbgs()
864+
<< " Strategy " << S.name() << " run=" << Run
865+
<< " found NS=" << NStages << " II=" << II << "\n");
866+
if (Success) {
867+
return true;
868+
}
863869
}
864870
resetSchedule(/*FullReset=*/false);
865871
}
@@ -907,9 +913,6 @@ bool PostPipeliner::schedule(ScheduleDAGMI &TheDAG, int InitiationInterval,
907913
LLVM_DEBUG(dbgs() << "PostPipeliner: No schedule found\n");
908914
return false;
909915
}
910-
if (!checkStages()) {
911-
return false;
912-
}
913916

914917
More.emit([&]() {
915918
return MachineOptimizationRemark("postpipeliner", "schedule", DbgLoc, BB)

0 commit comments

Comments
 (0)