[PATCH] D151341: AMDGPU: Special case uniformity info for singlethreaded workitem IDs
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 06:43:14 PDT 2023
nhaehnle added a comment.
This could be a top-level check in isSourceOfDivergence: if a source of divergence executes with a single lane, it de facto stops being a source of divergence.
But even beyond that: it is reasonably common to have compute shaders that do something like this:
if (threadid == 0) {
...
}
So it would be interesting to be able to handle this more generally in UniformityAnalysis, perhaps by having a callback that analyzes conditional branches and returns whether one side of the branch is entered by at most one lane.
Once that's the long-term goal, it seems plausible to me to make `isSingleLaneExecution(Function &)` a callback that is accessible to UniformityAnalysis, as opposed to querying it from isSourceOfDivergence.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151341/new/
https://reviews.llvm.org/D151341
More information about the llvm-commits
mailing list