[PATCH] D119669: [NVPTX] Prefix "$L__" for branch label names
Andrew Savonichev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 12:58:25 PDT 2022
asavonic added a comment.
In D119669#3486842 <https://reviews.llvm.org/D119669#3486842>, @tra wrote:
> In D119669#3481191 <https://reviews.llvm.org/D119669#3481191>, @tra wrote:
>
>> So, prefixing with `$` does not solve the problem completely.
>
> Indeed it's still possible to break compilation for both clang and nvcc: https://godbolt.org/z/9h649eMMn
I guess that `$__` prefix was chosen because it matches nvcc.
> We may be better off using % or just __ as the prefix. While it's possible to have a conflict with the latter one, at least the end users are not supposed to use it.
Using `%` instead of `$` sounds like a good idea - it is not a valid identifier in C, and it seems to be supported by ptxas.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119669/new/
https://reviews.llvm.org/D119669
More information about the llvm-commits
mailing list