-
Notifications
You must be signed in to change notification settings - Fork 25
Stuckmann.multi.slot.pseudos #304
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
Stuckmann.multi.slot.pseudos #304
Conversation
1b09f1e
to
6f5a268
Compare
7dc8b43
to
2537cb3
Compare
|
@@ -60,4 +60,8 @@ const MCFormatDesc *AIEMCFormats::getMCFormats() const { return AIE::Formats; } | |||
|
|||
const PacketFormats &AIEMCFormats::getPacketFormats() const { return Formats; } | |||
|
|||
SmallVector<MCSlotKind, 2> AIEMCFormats::getLoadSlotKinds() const { | |||
return {AIESlotKind::AIE_SLOT_LDB, AIESlotKind::AIE_SLOT_LDA}; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to forget AIE1. We won't hit the unreachable, will we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we would hit unreachable, if i don't implement it for AIE1 and if the option is turned on by default, we would break stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we? I don't think AIE1 uses the MachineScheduler
27a6f34
to
c2bc7d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Apply nits to taste
/// \return an unused Slot from the mapping. | ||
std::optional<MCSlotKind> getUnusedSlot(const AIEBaseInstrInfo *TII) const { | ||
const SmallVector<MCSlotKind, 2> UnusedLoadSlots = | ||
TII->getFormatInterface()->getLoadSlotKinds(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: just LoadSlots
?
Nit2: Maybe also rename the function to getUnusedLoadSlot()
, because this is only to be used for multi-slot instructions that load.
It might actually just be better to iterate over the slots of the multi-slot instruction directly? I'm not sure why we need getLoadSlotKinds()
std::optional<MCSlotKind> | ||
getLeastRecentlyUsedSlot(const AIEBaseInstrInfo *TII) { | ||
SmallVector<MCSlotKind, 2> AvailableSlots = | ||
TII->getFormatInterface()->getLoadSlotKinds(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: I guess this is fine for now, but I believe we'd rather just collect all the "feasible slots" by iterating over the multi-slot instructions, and create a least-recently-used list out of them, like we do in register-reallocation. This would avoid the need for a new getLoadSlotKinds()
hook.
6af25cb
to
584bec1
Compare
Heads-up: I have now rebased #359 on top of Also, it would be nice to update the tests in |
.../CodeGen/AIE/aie2p/schedule/postpipeliner/multiSlotAssignment/future_conflict_assignment.mir
Outdated
Show resolved
Hide resolved
.../CodeGen/AIE/aie2p/schedule/postpipeliner/multiSlotAssignment/future_conflict_assignment.mir
Show resolved
Hide resolved
89f3c1d
to
e76ea94
Compare
584bec1
to
d10386e
Compare
e9d83bf
to
cba1294
Compare
fixed githubs rebase issues |
Statically assign multi-slot pseudo instructions.
todos: