[PATCH] D119530: [RISCV] Add combination crypto extensions in ISAInfo
Xinlong Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 01:45:55 PST 2022
VincentWu added inline comments.
================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:754
static const char *ImpliedExtsZvl64b[] = {"zvl32b"};
static const char *ImpliedExtsZk[] = {"zkn", "zkt", "zkr"};
static const char *ImpliedExtsZkn[] = {"zbkb", "zbkc", "zbkx", "zkne", "zknd", "zknh"};
----------------
craig.topper wrote:
> VincentWu wrote:
> > i'm not sure did you notice that?
> >
> > could you explain what's different about this patch?
> I believe this patch is inferring Zk when all of zkn, zkr, and zkt are listed in march. This is needed so that __riscv_zk gets defined in the frontend preprocessor when the individual extensions are listed individually.
oh, yes. you are right. Then could we just use one variable if the value of `ImpliedExtsZk` and `CombineIntoZk` are entirely same?
cuz I think it is better to maintain if we combine them.
================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:841
+static constexpr CombinedExtsEntry CombineIntoExts[] = {
+ {{"zk"}, {CombineIntoZk}},
+ {{"zkn"}, {CombineIntoZkn}},
----------------
could we use `ImpliedExtsZk` here if they have same value?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119530/new/
https://reviews.llvm.org/D119530
More information about the llvm-commits
mailing list