[llvm] [NVPTX] Teach NVPTX about predicates (PR #67468)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 10:39:10 PDT 2023


Artem-B wrote:

I've asked NVIDIA's compiler folks about jumps vs predicates, and they say that jumps win:

> Q:  [jumps vs. predicates]
> A: The short answer is it is better to generate branches. Current PTXAS are more trained to do that. We had done some work where we did control dependence based analysis and put masks on various PTX instructions and put out a linearized sequence of PTX instructions and it didnt work very well. There were a few issues:
> 1. register allocator slowed down due to predicated instructions. and didn't do a good a job as the traditional register allocation
> 2. PTXAS unpredicated some cases and re-introduced control flow.
> 3. handling of loops with warp divergent loop tests was problematic, predicated branches :(



https://github.com/llvm/llvm-project/pull/67468


More information about the llvm-commits mailing list