[all-commits] [llvm/llvm-project] 2e2093: [RISCV] Remove UpperBound from SchedMxList and cre...

Michael Maitland via All-commits all-commits at lists.llvm.org
Mon Mar 27 06:47:45 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e2093aa15a5d2c4ca36e90ee6b1b52c8e49fe6a
  Author: Michael Maitland <michaeltmaitland at gmail.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoV.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
    M llvm/lib/Target/RISCV/RISCVScheduleV.td

  Log Message:
  [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

Differential Revision: https://reviews.llvm.org/D146855

More information about the All-commits mailing list