[SYCL][CUDA] Add IPSCCP pass to O0 by default #5900
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The IPSCCP pass can set branch conditions to ConstInt and swap conditional branches to unconditional branches.
This is necessary at O0 in the nvptx backend in cases where the
nvvm_reflect
function is used: after the nvvm-reflect pass is called, dead branches containing unused instructions aimed at a different architecture generation (SM version) to the one compiled for can remain.A solution only targeting branches that are using the
nvvm_reflect
function was initially explored by adding a patch to the existing nvvm-reflect pass. This solution would require considering several cases and was abandoned in favour of a simple comprehensive solution of simply adding the IPSCCP pass to OO: since after discussions it turned out that other backends face a corresponding issue, it was decided that a simple temporary DPC++ solution is favoured and that later on in the year a permanent general solution will be worked on.New backend flag
use-ipsccp-nvptx-O0
can remove the IPSCCP pass from O0 when set false, at the users discretion.