This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove UpperBound from SchedMxList and create WorstCaseBehavior records. NFC
ClosedPublic

Authored by michaelmaitland on Mar 24 2023, 5:30 PM.

Details

Summary

Prior to this patch, UpperBound refered to the largest LMUL
supported. Instructions used UpperBound to assign the worst
case behaviour to records, since Instructions are not LMUL
specific. This forced the largest LMUL to have the worst case
behavior, even if that wasn't true for a subtarget.

Now that SchedWrites, SchedReads, WriteRes, and ReadAdvances
are created for (name, LMUL) pairs and (name, LMUL, SEW)
tuples, it becomes even less clear which pair should correspond
to the worst case behavior. Additionally, it no longer makes sense
for the UpperBound to belong to LMUL list and not to the SEW list.

Instead of creating a special UpperBound LMUL and an UpperBound
SEW, this patch renames UpperBound to WorstCaseBehavior, removes
it from the SchedMxList, and defines a WorstCaseBehavior SchedWrite,
SchedRead, WriteRes, and ReadAdvance for each name.

This gives subtargets the ability to describe the worst case behavior
of a record without forcing it to be the largest LMUL or the smallest
SEW.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 5:30 PM
michaelmaitland requested review of this revision.Mar 24 2023, 5:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 5:30 PM
michaelmaitland retitled this revision from [RISCV] Remove UpperBound from SchedMxList and create WorstCaseBehavior records to [RISCV] Remove UpperBound from SchedMxList and create WorstCaseBehavior records. NFC.Mar 24 2023, 5:30 PM

Fix build errors

Remove unused subroutine

llvm/lib/Target/RISCV/RISCVScheduleV.td
67–68

These LMULSEW classes don't exist in upstream. Do you forget to merge them into upstream?

llvm/lib/Target/RISCV/RISCVScheduleV.td
67–68

Oops. Ignore me, I just found that I haven't pulled upstream for a long time.

This revision is now accepted and ready to land.Mar 26 2023, 8:35 PM

Reverted because new cases of UpperBound were introduced after merging.