[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)
Alexandros Lamprineas via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 07:42:49 PST 2024
================
@@ -218,8 +218,8 @@ void ABIInfo::appendAttributeMangling(StringRef AttrStr,
// only have "+" prefixes here.
assert(LHS.starts_with("+") && RHS.starts_with("+") &&
"Features should always have a prefix.");
- return TI.multiVersionSortPriority(LHS.substr(1)) >
- TI.multiVersionSortPriority(RHS.substr(1));
+ return TI.getFMVPriority({LHS.substr(1)}) >
+ TI.getFMVPriority({RHS.substr(1)});
----------------
labrinea wrote:
Perhaps there is value in adding another hook `getFMVPriority(StringRef feature)` which would be called on each feature of `ArrayRef<StringRef> Features` from the other hook, in order to avoid this inefficiency here of having to create a single element smallvector each time?
https://github.com/llvm/llvm-project/pull/116257
More information about the cfe-commits
mailing list