-
Notifications
You must be signed in to change notification settings - Fork 779
[SYCL][NFC] Add SYCLPropagateAspectsUsage pass #6670
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
[SYCL][NFC] Add SYCLPropagateAspectsUsage pass #6670
Conversation
Added a pass which is a part of optional kernel features design: it uses information provieded by FE & Headers about aspects used in device code to propagate it through the call graph to mark all kernels and functions with list of aspects they use.
This is a partial re-submit of #5348. I intentionally reduced the scope of the patch to simplify review and avoid some stuff which caused a lot of discussions and requires more work to be properly acceptable. The PR adds a pass in accordance with optional kernel features design document. For now, the only thing the pass can do is to collect optional kernel features usages and propagate info about them through a call graph, adding necessary metadata to functions and kernels. The pass is not yet included into a pipeline, that will be done in follow-up PRs together with consumers of metadata emitted by the pass |
@asudarsa, could you please take a look? |
public: | ||
PreservedAnalyses run(Module &M, ModuleAnalysisManager &); | ||
}; | ||
|
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.
Are we not creating 'legacy' versions anymore?
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.
This pass is supposed to be used from clang/lib/CodeGen/BackendUtil.cpp
, i.e. from Clang middle-end passes, which use new pass manager without possibility to switch to legacy one
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.
Looks good overall. A few nitpicks. Also, I wanted to check where this pass will be called eventually.
Thanks.
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.
Just one correction. Otherwise, looks good.
Thanks
HIP XPASSES are unrelated and they were resolved in intel/llvm-test-suite#1236 |
Comments from Arvind were trivial and were applied. Dismissing the review to get the patch merged sooner
@AlexeySachkov, this PR breaks |
|
Added a pass which is a part of optional kernel features design: it uses
information provieded by FE & Headers about aspects used in device code
to propagate it through the call graph to mark all kernels and functions
with list of aspects they use.
Co-authored-by: Maksim Sabianin maksim.sabianin@intel.com