This revision was automatically updated to reflect the committed changes. Closed by commit rGcac4e2fe2582: [CUDA][HIP] Fix gpu.used.external (authored by yaxunl). Herald added a project: clang.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123946/new/ https://reviews.llvm.org/D123946 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGenCUDA/host-used-extern.cu Index: clang/test/CodeGenCUDA/host-used-extern.cu =================================================================== --- clang/test/CodeGenCUDA/host-used-extern.cu +++ clang/test/CodeGenCUDA/host-used-extern.cu @@ -11,19 +11,19 @@ #include "Inputs/cuda.h" -// CHECK-LABEL: @gpu.used.external = appending {{.*}}global +// CHECK-LABEL: @__clang_gpu_used_external = appending {{.*}}global // CHECK-DAG: @_Z7kernel1v // CHECK-DAG: @_Z7kernel4v // CHECK-DAG: @var1 -// CHECK-LABEL: @llvm.compiler.used = {{.*}} @gpu.used.external - -// NEG-NOT: @gpu.used.external = {{.*}} @_Z7kernel2v -// NEG-NOT: @gpu.used.external = {{.*}} @_Z7kernel3v -// NEG-NOT: @gpu.used.external = {{.*}} @var2 -// NEG-NOT: @gpu.used.external = {{.*}} @var3 -// NORDC-NOT: @gpu.used.external = {{.*}} @_Z7kernel1v -// NORDC-NOT: @gpu.used.external = {{.*}} @_Z7kernel4v -// NORDC-NOT: @gpu.used.external = {{.*}} @var1 +// CHECK-LABEL: @llvm.compiler.used = {{.*}} @__clang_gpu_used_external + +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel2v +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel3v +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @var2 +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @var3 +// NORDC-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel1v +// NORDC-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel4v +// NORDC-NOT: @__clang_gpu_used_external = {{.*}} @var1 __global__ void kernel1(); Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -599,7 +599,7 @@ auto *GV = new llvm::GlobalVariable( getModule(), ATy, false, llvm::GlobalValue::AppendingLinkage, - llvm::ConstantArray::get(ATy, UsedArray), "gpu.used.external"); + llvm::ConstantArray::get(ATy, UsedArray), "__clang_gpu_used_external"); addCompilerUsedGlobal(GV); }
Index: clang/test/CodeGenCUDA/host-used-extern.cu =================================================================== --- clang/test/CodeGenCUDA/host-used-extern.cu +++ clang/test/CodeGenCUDA/host-used-extern.cu @@ -11,19 +11,19 @@ #include "Inputs/cuda.h" -// CHECK-LABEL: @gpu.used.external = appending {{.*}}global +// CHECK-LABEL: @__clang_gpu_used_external = appending {{.*}}global // CHECK-DAG: @_Z7kernel1v // CHECK-DAG: @_Z7kernel4v // CHECK-DAG: @var1 -// CHECK-LABEL: @llvm.compiler.used = {{.*}} @gpu.used.external - -// NEG-NOT: @gpu.used.external = {{.*}} @_Z7kernel2v -// NEG-NOT: @gpu.used.external = {{.*}} @_Z7kernel3v -// NEG-NOT: @gpu.used.external = {{.*}} @var2 -// NEG-NOT: @gpu.used.external = {{.*}} @var3 -// NORDC-NOT: @gpu.used.external = {{.*}} @_Z7kernel1v -// NORDC-NOT: @gpu.used.external = {{.*}} @_Z7kernel4v -// NORDC-NOT: @gpu.used.external = {{.*}} @var1 +// CHECK-LABEL: @llvm.compiler.used = {{.*}} @__clang_gpu_used_external + +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel2v +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel3v +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @var2 +// NEG-NOT: @__clang_gpu_used_external = {{.*}} @var3 +// NORDC-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel1v +// NORDC-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel4v +// NORDC-NOT: @__clang_gpu_used_external = {{.*}} @var1 __global__ void kernel1(); Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -599,7 +599,7 @@ auto *GV = new llvm::GlobalVariable( getModule(), ATy, false, llvm::GlobalValue::AppendingLinkage, - llvm::ConstantArray::get(ATy, UsedArray), "gpu.used.external"); + llvm::ConstantArray::get(ATy, UsedArray), "__clang_gpu_used_external"); addCompilerUsedGlobal(GV); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits