[PATCH] D154241: [OpenMP][NVPTX] Handle additional invalid PTX characters
Chi Chun Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 12:59:07 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6555c474483d: [OpenMP][NVPTX] Handle additional invalid PTX characters (authored by sandoval, committed by cchen).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154241/new/
https://reviews.llvm.org/D154241
Files:
llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
llvm/test/CodeGen/NVPTX/symbol-naming.ll
Index: llvm/test/CodeGen/NVPTX/symbol-naming.ll
===================================================================
--- llvm/test/CodeGen/NVPTX/symbol-naming.ll
+++ llvm/test/CodeGen/NVPTX/symbol-naming.ll
@@ -7,9 +7,11 @@
; PTX.
; CHECK-NOT: .str
+; CHECK-NOT: <str>
; CHECK-NOT: .function.
; CHECK-DAG: _$_str
+; CHECK-DAG: _$_str_$_
; CHECK-DAG: _$_str1
; CHECK-DAG: _$_function_$_
@@ -20,6 +22,7 @@
@.str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
+@"<str>" = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
@_$_str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
@@ -27,6 +30,7 @@
define internal void @.function.() {
entry:
%call = call i32 (ptr, ...) @printf(ptr @.str)
+ %call2 = call i32 (ptr, ...) @printf(ptr @"<str>")
ret void
}
@@ -34,6 +38,7 @@
define internal void @_$_function_$_() {
entry:
%call = call i32 (ptr, ...) @printf(ptr @_$_str)
+ %call2 = call i32 (ptr, ...) @printf(ptr @"<str>")
ret void
}
Index: llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
===================================================================
--- llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
+++ llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
@@ -73,7 +73,7 @@
std::string ValidName;
raw_string_ostream ValidNameStream(ValidName);
for (char C : Name) {
- if (C == '.' || C == '@') {
+ if (C == '.' || C == '@' || C == '<' || C == '>') {
ValidNameStream << "_$_";
} else {
ValidNameStream << C;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154241.536383.patch
Type: text/x-patch
Size: 1571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230630/deef2b69/attachment.bin>
More information about the llvm-commits
mailing list