[clang] [llvm] [Reland] [PowerPC] frontend get target feature from backend with cpu name (PR #144594)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 23:01:22 PDT 2025
================
@@ -190,6 +192,31 @@ insertWaveSizeFeature(StringRef GPU, const Triple &T,
StringMap<bool> &Features);
} // namespace AMDGPU
+
+struct BasicSubtargetFeatureKV {
+ const char *Key; ///< K-V key string
+ unsigned Value; ///< K-V integer value
+ FeatureBitArray Implies; ///< K-V bit mask
+};
+
+/// Used to provide key value pairs for feature and CPU bit flags.
+struct BasicSubtargetSubTypeKV {
+ const char *Key; ///< K-V key string
+ FeatureBitArray Implies; ///< K-V bit mask
+
+ /// Compare routine for std::lower_bound
+ bool operator<(StringRef S) const { return StringRef(Key) < S; }
+
+ /// Compare routine for std::is_sorted.
+ bool operator<(const BasicSubtargetSubTypeKV &Other) const {
+ return StringRef(Key) < StringRef(Other.Key);
+ }
+};
----------------
lenary wrote:
Given this is a reland, sure, I'm happy for you to do this refactor later.
https://github.com/llvm/llvm-project/pull/144594
More information about the llvm-commits
mailing list