Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Martien.exhaustiveswp #242

Merged
merged 15 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llvm/lib/Target/AIE/AIEBaseSubtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ AIEBaseSubtarget::getPostRAMutationsImpl(const Triple &TT) {
std::vector<std::unique_ptr<ScheduleDAGMutation>> Mutations;
Mutations.emplace_back(std::make_unique<LockDelays>());
if (!TT.isAIE1()) {
if (EnableWAWStickyRegisters)
Mutations.emplace_back(std::make_unique<WAWStickyRegistersEdges>());
gbossu marked this conversation as resolved.
Show resolved Hide resolved
Mutations.emplace_back(std::make_unique<RegionEndEdges>());
Mutations.emplace_back(std::make_unique<MemoryEdges>());
Mutations.emplace_back(std::make_unique<MachineSchedWAWEdges>());
Expand Down
7 changes: 5 additions & 2 deletions llvm/lib/Target/AIE/AIEMachineScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,9 @@ void llvm::AIEPostRASchedStrategy::buildGraph(ScheduleDAGMI &DAG, AAResults *AA,
assert(BS.getRegions().size() == 1);
// Try to wrap the linear schedule within II.
// We virtually unroll the body by the stagecount, computed from rounding
// up the length divided by II.
NCopies = (BS.getScheduleLength() + II - 1) / II;
// up the length divided by II, adding one more stage to account for
// the added resource contention
NCopies = (BS.getScheduleLength() + II - 1) / II + 1;
}
DEBUG_BLOCKS(dbgs() << " buildGraph, NCopies=" << NCopies << "\n");
for (int S = 0; S < NCopies; S++) {
Expand Down Expand Up @@ -1386,6 +1387,8 @@ void AIEScheduleDAGMI::schedule() {
// If it succeeds, we need to implement it, if we fail we fall back on the
// normal loop schedule
SchedImpl->buildGraph(*this, AA);
postProcessDAG();

auto &PostSWP = BS.getPostSWP();
if (PostSWP.schedule(*this, BS.FixPoint.II)) {
BS.setPipelined();
Expand Down
Loading
Loading