[PATCH] D145538: [NFC][AArch64] Document and improve FMV code.

Pavel Iliin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 11:11:56 PST 2023


ilinpv marked 5 inline comments as done.
ilinpv added inline comments.


================
Comment at: llvm/include/llvm/TargetParser/AArch64TargetParser.h:567-568
+
+// For given features returns a mask to check if CPU support them. The mask is
+// used in Function Multi Versioning resolver conditions code generation.
 uint64_t getCpuSupportsMask(ArrayRef<StringRef> FeatureStrs);
----------------
tmatheson wrote:
> `CPUFeatures` has 60 entries, which means the return value here will overflow if we add a few more entries. We should probably have a `static_assert(FEAT_MAX <= 64)` in the implementation. Or should the `CPUFeatures` values actually be bitmasks, like ArchExtKind?
static_assert added. I think changing values to masks could be done separately, it would be good to have if we eventually come to CPUFeatures and ArchExtKind unification. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145538/new/

https://reviews.llvm.org/D145538



More information about the llvm-commits mailing list