================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits