[PATCH] D146198: [RISCV] Make ResourceCycles relevant to LMUL

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 01:01:00 PDT 2023


pcwang-thead created this revision.
pcwang-thead added reviewers: reames, michaelmaitland, craig.topper.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.

When modeling vector WriteRes, there are some fields that we can
spcify to model its costs like `Latency`, `ResourceCycles`, etc.

For `Latency`, it may not be relevant to LMUL with mechanisms like
chaining[1].

But for `ResourceCycles`, it may be different. The cycles of some
resources can be relevant to LMUL. For example, the generation and
issuing of uops.

In this patch, we add a new template parameter `resourceCycles` to
`LMULWriteResImpl`. The `resourceCycles` is a list of `ResourceCycle`,
which can be `FixedResourceCycle` or `LMULResourceCycle`. With these
two kinds of `ResourceCycle`, we can model resources whose cycles
are fixed for different LMULs via `FixedResourceCycle` and resources
whose cycles are a multiple of LMUL via `LMULResourceCycle`.

References:
[1] Chaining (vector processing) <https://en.wikipedia.org/wiki/Chaining_(vector_processing)>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146198

Files:
  llvm/lib/Target/RISCV/RISCVScheduleV.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146198.505717.patch
Type: text/x-patch
Size: 5474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230316/17753b23/attachment.bin>


More information about the llvm-commits mailing list