[PATCH] D150675: [AMDGPU] Rewrite device ctor / dtor handling to use .init / .fini sections
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 11:33:57 PDT 2023
arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.
Wondering if it's worth maintaining a way to keep the old non-indirect codegen for LTO
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp:103-104
+ IRB.CreateCall(CallBackTy, CallBack);
+ auto *NewCallBack = IRB.CreateInBoundsGEP(
+ PtrTy, CallBackPHI, ConstantInt::get(IRB.getInt64Ty(), 1), "next");
+ auto *EndCmp = IRB.CreateICmpEQ(NewCallBack, End, "end");
----------------
CreateConstInBoundsGEP1_64
================
Comment at: llvm/test/CodeGen/AMDGPU/lower-ctor-dtor-constexpr-alias.ll:20
;.
+; CHECK: @__init_array_start = external addrspace(1) constant [0 x ptr addrspace(1)]
+; CHECK: @__init_array_end = external addrspace(1) constant [0 x ptr addrspace(1)]
----------------
It's not really wrong but maybe we should use the default program address space instead
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150675/new/
https://reviews.llvm.org/D150675
More information about the llvm-commits
mailing list