[llvm] [NVPTX] improve identifier renaming for PTX (PR #79459)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 13:17:33 PST 2024
================
@@ -73,10 +74,10 @@ std::string NVPTXAssignValidGlobalNames::cleanUpName(StringRef Name) {
std::string ValidName;
raw_string_ostream ValidNameStream(ValidName);
for (char C : Name) {
- if (C == '.' || C == '@' || C == '<' || C == '>') {
- ValidNameStream << "_$_";
- } else {
+ if (isAlnum(C) || C == '_' || C == '$') {
----------------
Artem-B wrote:
That's worth a comment explaining the discrepancy between what PTX allows and what we're checking for here.
https://github.com/llvm/llvm-project/pull/79459
More information about the llvm-commits
mailing list