[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 29 00:13:39 PST 2024


================
@@ -814,6 +814,15 @@ bool shouldEmitConstantsToTextSection(const Triple &TT);
 /// to integer.
 int getIntegerAttribute(const Function &F, StringRef Name, int Default);
 
+/// \returns Unsigned Integer value requested using \p F's \p Name attribute.
+///
+/// \returns \p Default if attribute is not present.
+///
+/// \returns \p Default and emits error if requested value cannot be converted
+/// to integer.
+unsigned getUnsignedIntegerAttribute(const Function &F, StringRef Name,
----------------
arsenm wrote:

The above getIntegerAttribute is actually dead, this shouldn't follow along. The equivalent functionality was moved to getFnAttributeAsParsedInteger

https://github.com/llvm/llvm-project/pull/79035


More information about the cfe-commits mailing list