Skip to content

[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

Conversation

AlexeySachkov
Copy link
Contributor

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

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.
@AlexeySachkov AlexeySachkov requested review from a team as code owners August 30, 2022 15:44
@AlexeySachkov
Copy link
Contributor Author

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

@AlexeySachkov
Copy link
Contributor Author

@asudarsa, could you please take a look?

KornevNikita
KornevNikita previously approved these changes Sep 5, 2022
public:
PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
};

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@asudarsa asudarsa left a 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.

@AlexeySachkov AlexeySachkov changed the title Add PropagateAspectsUsage pass [SYCL][NFC] Add SYCLPropagateAspectsUsage pass Sep 7, 2022
Copy link
Contributor

@asudarsa asudarsa left a 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

@AlexeySachkov
Copy link
Contributor Author

HIP XPASSES are unrelated and they were resolved in intel/llvm-test-suite#1236

@AlexeySachkov AlexeySachkov dismissed asudarsa’s stale review September 9, 2022 09:29

Comments from Arvind were trivial and were applied. Dismissing the review to get the patch merged sooner

@AlexeySachkov AlexeySachkov merged commit b81f9df into intel:sycl Sep 9, 2022
@bader
Copy link
Contributor

bader commented Sep 11, 2022

@AlexeySachkov, this PR breaks check-llvm for the configuration with enabled opaque pointer support. Could you take a look and fix tests to work with opaque pointers, please?

@AlexeySachkov
Copy link
Contributor Author

@AlexeySachkov, this PR breaks check-llvm for the configuration with enabled opaque pointer support. Could you take a look and fix tests to work with opaque pointers, please?

@bader, I've published a fix in #6767

@AlexeySachkov AlexeySachkov deleted the private/asachkov/propagate-aspects-usage-pass branch May 22, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants