-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL] Disable dead arg elimination for free function kernels #19776
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
base: sycl
Are you sure you want to change the base?
[SYCL] Disable dead arg elimination for free function kernels #19776
Conversation
This reverts commit 34a11ca.
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.
We need a LIT test for the change, see llvm/test/Transforms/DeadArgElim/sycl-kernels.ll
for an example of existing test
I've removed reference to the internal bug report from the PR's description. That's not how upstream development should be done. That said, the rest of the description was great and provides enough context for the change, so no additional actions needed. |
Something is wrong with codeownership. I'd expect |
… of https://github.com/lbushi25/llvm into disable_dead_arg_elimination_for_free_function_kernels
// This test verifies that the dead argument elimination optimization pass does not affect | ||
// free function kernels. | ||
|
||
// CHECK-NOT: !sycl_kernel_omit_args |
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.
Could you add a non-free-function kernel to this test and check that DAE still works?
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.
I refactored the tests. I deleted this one and I added two test cases for free function kernels in the existing test sycl-kernels-neg.ll
using LLVM IR directly.
Note that there is already another test sycl-kernels.ll
in the same directory which checks that DAE still works with other kernels.
This PR disables dead argument elimination for free function kernels. When using a free function kernel, the user sets the arguments manually using
handler::set_arg
but if certain arguments are optimized away in case they are not used, the implementation needs to be aware of this and remove the relevantset_arg
calls. Instead, its much more feasible to just disable dead arg elimination in this case.