Skip to content

Commit

Permalink
[AIE] Fix PostPipeliner crash
Browse files Browse the repository at this point in the history
We can't check LCDs for NCopies=1, but it also never gives a useful schedule.
  • Loading branch information
Martien de Jong authored and martien-de-jong committed Oct 9, 2024
1 parent 4df25f3 commit ab9a9f7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions llvm/lib/Target/AIE/AIEPostPipeliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,19 @@ bool PostPipeliner::scheduleOtherIterations() {
}

bool PostPipeliner::schedule(ScheduleDAGMI &TheDAG, int InitiationInterval) {
NTotalInstrs = TheDAG.SUnits.size();
assert(NTotalInstrs % NInstr == 0);
NCopies = NTotalInstrs / NInstr;
if (NCopies == 1) {
LLVM_DEBUG(dbgs() << "PostPipeliner: Not feasible\n");
return false;
}
II = InitiationInterval;
DAG = &TheDAG;
NTotalInstrs = DAG->SUnits.size();
FirstUnscheduled = 0;
assert(NTotalInstrs % NInstr == 0);

// Let's not skimp on size here. This allows us to insert any instruction
// in the unrolled dag.
NCopies = NTotalInstrs / NInstr;
Depth = NCopies * II + HR.getPipelineDepth();
Scoreboard.reset(Depth);

Expand Down

0 comments on commit ab9a9f7

Please sign in to comment.