[llvm] [NVPTX] Add support for calling aliases (PR #81170)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 13:08:05 PST 2024


jhuber6 wrote:

> In addition, the declarations of the alias functions must occur before the uses. To fix this we emit alias declarations as part of `emitDeclarations` and only emit the `.alias` directives at the end (where we can assume the aliasee has also already been declared).

I think I just referred to https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#kernel-and-function-directives-alias when I originally implemented this and didn't notice any such restriction documented. My main motivation was just to allow `gnu::alias` to codegen on NVPTX targets, so it's likely all the existing uses just got optimized out.

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


More information about the llvm-commits mailing list