[PATCH] D146198: [RISCV] Make ResourceCycles relevant to LMUL
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 00:42:00 PDT 2023
craig.topper added a comment.
In D146198#4232590 <https://reviews.llvm.org/D146198#4232590>, @pcwang-thead wrote:
> In D146198#4231514 <https://reviews.llvm.org/D146198#4231514>, @craig.topper wrote:
>
>> Why can't ResourceCycles be the base class that just contains a list of integers. Other classes inherit that and construct the list however they want. A fixed class could take a cycle count and put that value in every entry in the list. The lmul scaled class could take an cycle and mutliply.
>
> I think the reason is that we need LMUL info to generate the list but we can't get it in SchedXXX.td.
> We had a complex implementation which seems to be likely what you described(if I understand correctly), I will upload it later. :-)
Why do we need LMUL info?
We can have a class that contains an 8 entry list of resource cycles for each LMUL plus upper bound. We can have derived classes that construct this list based on common cases.
LMULWriteResImpl can index into the list to the entry corresponding to the LMUL. Nothing in RISCVScedule.td needs to know how the list was constructed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146198/new/
https://reviews.llvm.org/D146198
More information about the llvm-commits
mailing list