================
@@ -1160,9 +1152,8 @@ void CGNVCUDARuntime::createOffloadingEntries() {
 
 // Returns module constructor to be added.
 llvm::Function *CGNVCUDARuntime::finalizeModule() {
+  transformManagedVars();
----------------
yxsamliu wrote:

we did the equivalent transformation previously during registration of managed 
var by calling replaceManagedVar directly, so it is actually NFC. We have lit 
test 
https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGenCUDA/managed-var.cu
 that covers transformation in both device and host code.

We also have execution tests in hip-tests 
https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGenCUDA/managed-var.cu


https://github.com/llvm/llvm-project/pull/85976
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to