[PATCH] D105682: [AMDGPU] Handle functions in llvm's global ctors and dtors list

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 16:57:11 PDT 2021


arsenm added a comment.

Why is metadata needed here? I thought constructors/destructors went into a special section



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp:32
+public:
+  Function *createInitOrFiniKerelFunction(Module &M, bool IsCtor) {
+    StringRef InitOrFiniKernelName = "__amdgpu_device_init";
----------------
Typo Kerel


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp:33
+  Function *createInitOrFiniKerelFunction(Module &M, bool IsCtor) {
+    StringRef InitOrFiniKernelName = "__amdgpu_device_init";
+    if (!IsCtor)
----------------
Probably should use llvm.amdgcn prefix and . separators


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105682/new/

https://reviews.llvm.org/D105682



More information about the llvm-commits mailing list