Skip to content

Commit

Permalink
[AIE] Bail out if RecMII not met.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martien de Jong committed Jan 9, 2025
1 parent b6b98db commit 3e5d4c7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions llvm/lib/Target/AIE/AIEPostPipeliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ bool PostPipeliner::computeLoopCarriedParameters() {
N.StaticLatest = N.Latest;
}
Info.compute();
return true;

// If no node can be scheduled in cycle 0, we must have a circuit that
// is longer than II
return Info.MinEarliest == 0;
}

int PostPipeliner::computeMinScheduleLength() const {
Expand Down Expand Up @@ -753,7 +756,7 @@ bool PostPipeliner::schedule(ScheduleDAGMI &TheDAG, int InitiationInterval) {
assert(NTotalInstrs % NInstr == 0);
NCopies = NTotalInstrs / NInstr;
if (NCopies == 1) {
LLVM_DEBUG(dbgs() << "PostPipeliner: Not feasible\n");
LLVM_DEBUG(dbgs() << "PostPipeliner: Not feasible - Too few stages\n");
return false;
}
II = InitiationInterval;
Expand All @@ -770,7 +773,12 @@ bool PostPipeliner::schedule(ScheduleDAGMI &TheDAG, int InitiationInterval) {
I++) { dbgs() << I << " " << *DAG->SUnits[I].getInstr(); });
LLVM_DEBUG(dumpGraph(Info, DAG));

computeLoopCarriedParameters();
bool Feasible = computeLoopCarriedParameters();
if (!Feasible) {
LLVM_DEBUG(dbgs() << "PostPipeliner: Not feasible - RecMII\n");
return false;
}

LLVM_DEBUG(dumpIntervals(Info, computeMinScheduleLength()));
if (!tryHeuristics()) {
LLVM_DEBUG(dbgs() << "PostPipeliner: No schedule found\n");
Expand Down

0 comments on commit 3e5d4c7

Please sign in to comment.