[RISCV] Remove UpperBound from SchedMxList and create WorstCaseBehavior records
authorMichael Maitland <michaeltmaitland@gmail.com>
Sat, 25 Mar 2023 00:16:41 +0000 (17:16 -0700)
committerMichael Maitland <michaeltmaitland@gmail.com>
Mon, 27 Mar 2023 13:06:55 +0000 (06:06 -0700)
commit74c0bd240499683078d4f15d31de690950da8231
treeb78819e099850a50d259a99514bbec03fbf470e8
parent074f6fd61d382ff6bf108472ea701d214b02f64b
[RISCV] Remove UpperBound from SchedMxList and create WorstCaseBehavior records

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.

Differential Revision: https://reviews.llvm.org/D146855
llvm/lib/Target/RISCV/RISCVInstrInfoV.td
llvm/lib/Target/RISCV/RISCVScheduleV.td