[PATCH] D149495: [RISCV] Add support for V extension in SiFive7
Michael Maitland via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 9 15:46:06 PDT 2023
michaelmaitland added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVSchedSiFive7.td:15
+class SiFive7IsWorstCaseMX<string mx, list<string> MxList> {
+ string LLMUL = LargestLMUL<MxList>.r;
+ bit c = !eq(mx, LLMUL);
----------------
pcwang-thead wrote:
> I think I have fixed the issue that `defar` can't refer to template arguments in D148197. So `LMUL`, `SSEW` and other fields can be replaced with `defvar`s.
A `defvar` statement defines a global variable. `SiFive7IsWorstCaseMX<mx, SchedMxList>.c` becomes invalid syntax since `c` is not a member of `SiFive7IsWorstCaseMX` now that `c` is global. If we did use `defvar` here and gave `c` a more unique name so that it could fit in the global space, then we would also need to complicate it by adding a `MXxxx_MxListxxx` suffix for all `mx` and `SchedMxList` pairs.
I think we'd like to keep these as `Type Iden = Value;`. What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149495/new/
https://reviews.llvm.org/D149495
More information about the cfe-commits
mailing list