Skip to content

[AIEX] Postpipeliner logging#843

Draft
F-Stuckmann wants to merge 4 commits intoaie-publicfrom
stuckmann.postpipeliner.debug
Draft

[AIEX] Postpipeliner logging#843
F-Stuckmann wants to merge 4 commits intoaie-publicfrom
stuckmann.postpipeliner.debug

Conversation

@F-Stuckmann
Copy link
Copy Markdown
Collaborator

Explain each declined scheduling decision in the postpipeliner.

This is a draft, I am still not happy with some parts of it.

@F-Stuckmann F-Stuckmann changed the title [AIEX] Postpipeoliner logging [AIEX] Postpipeliner logging Mar 12, 2026
StringRef FuncUnitWrapper::SlotLetters;
void FuncUnitWrapper::setFormatInterface(const AIEBaseMCFormats *Formats) {
FormatInterface = Formats;
SlotLetters = Formats ? Formats->getSlotLetters() : StringRef();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a performance penalty on every single scheduling action to cache something only necessary for dumping.

}

/// Initialize the format interface and derive slot letter abbreviations
/// from it. Must be called before slot-aware debug output is used.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this has always been an eyesore. We may be able to arrange for this in AIEBaseSubtarget. FormatInterface is a AIE-wide extension to InstrInfo. / ItineraryData

}
dbgs() << "\t";
Cycle.dump();
dbgs() << (C == 0 ? ">" : " ") << format("%3d", C) << ":\t";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip: format("%c%3d:\t", C==0 ? '>' : ' ', C)

Add getSlotLetters() virtual to AIEBaseMCFormats with per-architecture
slot-to-letter mappings. Use these letters in FuncUnitWrapper::dump()
and PostPipeliner debug functions instead of numeric digits.
Add optional II parameter to ResourceScoreboard::dumpFull(). When
provided, a blank line is inserted after every II-th cycle to visually
separate modulo stages.
Track which schedule lengths have been dumped to avoid duplicate output.
Dump intervals the first time each unique length is encountered in the
heuristic and relaxed strategy loops.
Add LLVM_DEBUG output when checkConflict() rejects a modulo cycle in
fitInInterval, making it easier to diagnose why an instruction could
not be placed at a particular cycle.
@F-Stuckmann F-Stuckmann force-pushed the stuckmann.postpipeliner.debug branch from ebbd732 to 9a7dcaf Compare April 7, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants