Skip to content

Commit 2f11c48

Browse files
author
Martien de Jong
committed
[AIE] Bail out if RecMII not met.
1 parent 558b18f commit 2f11c48

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Diff for: llvm/lib/Target/AIE/AIEPostPipeliner.cpp

+11-3
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ bool PostPipeliner::computeLoopCarriedParameters() {
342342
N.StaticLatest = N.Latest;
343343
}
344344
Info.compute();
345-
return true;
345+
346+
// If no node can be scheduled in cycle 0, we must have a circuit that
347+
// is longer than II
348+
return Info.MinEarliest == 0;
346349
}
347350

348351
int PostPipeliner::computeMinScheduleLength() const {
@@ -756,7 +759,7 @@ bool PostPipeliner::schedule(ScheduleDAGMI &TheDAG, int InitiationInterval) {
756759
assert(NTotalInstrs % NInstr == 0);
757760
NCopies = NTotalInstrs / NInstr;
758761
if (NCopies == 1) {
759-
LLVM_DEBUG(dbgs() << "PostPipeliner: Not feasible\n");
762+
LLVM_DEBUG(dbgs() << "PostPipeliner: Not feasible - Too few stages\n");
760763
return false;
761764
}
762765
II = InitiationInterval;
@@ -773,7 +776,12 @@ bool PostPipeliner::schedule(ScheduleDAGMI &TheDAG, int InitiationInterval) {
773776
I++) { dbgs() << I << " " << *DAG->SUnits[I].getInstr(); });
774777
LLVM_DEBUG(dumpGraph(Info, DAG));
775778

776-
computeLoopCarriedParameters();
779+
bool Feasible = computeLoopCarriedParameters();
780+
if (!Feasible) {
781+
LLVM_DEBUG(dbgs() << "PostPipeliner: Not feasible - RecMII\n");
782+
return false;
783+
}
784+
777785
LLVM_DEBUG(dumpIntervals(Info, computeMinScheduleLength()));
778786
if (!tryHeuristics()) {
779787
LLVM_DEBUG(dbgs() << "PostPipeliner: No schedule found\n");

0 commit comments

Comments
 (0)