-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Simplify arguments to computeModuleProperties #15271
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 |
---|---|---|
|
@@ -47,9 +47,6 @@ constexpr char SPIRV_GET_SPEC_CONST_VAL[] = "__spirv_SpecConstant"; | |
constexpr char SPIRV_GET_SPEC_CONST_COMPOSITE[] = | ||
"__spirv_SpecConstantComposite"; | ||
|
||
// Name of the metadata which holds a list of all specialization constants (with | ||
// associated information) encountered in the module | ||
constexpr char SPEC_CONST_MD_STRING[] = "sycl.specialization-constants"; | ||
// Name of the metadata which holds a default value list of all specialization | ||
// constants encountered in the module | ||
constexpr char SPEC_CONST_DEFAULT_VAL_MD_STRING[] = | ||
|
@@ -1029,6 +1026,9 @@ PreservedAnalyses SpecConstantsPass::run(Module &M, | |
for (const auto &P : DefaultsMetadata) | ||
MDDefaults->addOperand(P); | ||
|
||
if (Mode == HandlingMode::default_values) | ||
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. Conceptually, 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. yeah i debated this, let me try putting it somewhere when we do the default split, will do in follow-up pr thx |
||
M.getOrInsertNamedMetadata(SPEC_CONST_DEFAULT_VAL_MODULE_MD_STRING); | ||
|
||
return IRModified ? PreservedAnalyses::none() : PreservedAnalyses::all(); | ||
} | ||
|
||
|
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.
Both
collectSpecConstantMetadata
andcollectSpecConstantDefaultValuesMetadata
perform this metadata check:llvm/llvm/lib/SYCLLowerIR/SpecConstants.cpp
Lines 1035 to 1039 in 9723157
Therefore, I wonder if we just need to omit it all together and instead put
PropSet.add
under condition thatTmpSpecIDMap
is not empty.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.
thanks, ill try this and make a follow-up PR if it works