[clang] [HIP][NFC] Refactor managed var codegen (PR #85976)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 22 06:03:20 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list