-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[AMDGPU][Attributor] Make AAAMDFlatWorkGroupSize
honor existing attribute
#114357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -936,6 +936,19 @@ getIntegerPairAttribute(const Function &F, StringRef Name, | |
std::pair<unsigned, unsigned> Default, | ||
bool OnlyFirstRequired = false); | ||
|
||
/// \returns A pair of integer values requested using \p F's \p Name attribute | ||
/// in "first[,second]" format ("second" is optional unless \p OnlyFirstRequired | ||
/// is false). | ||
/// | ||
/// \returns \p std::nullopt if attribute is not present. | ||
/// | ||
/// \returns \p std::nullopt and emits error if one of the requested values | ||
/// cannot be converted to integer, or \p OnlyFirstRequired is false and | ||
/// "second" value is not present. | ||
std::optional<std::pair<unsigned, std::optional<unsigned>>> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why the second entry is optional. This is spreading a parsing detail to users of the value. Users should be able to just treat it as-if it always has 2 components, the one entry forms are just a compatibility thing with old IR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our front end can still emit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That should never happen. But as a parsing function, that should be abstracted from the attributor's usage |
||
getIntegerPairAttribute(const Function &F, StringRef Name, | ||
bool OnlyFirstRequired = false); | ||
|
||
/// \returns Generate a vector of integer values requested using \p F's \p Name | ||
/// attribute. | ||
/// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra parens?