The default construction of constructor functions by LLVM tends to make
them have internal linkage. When we call a ctor / dtor function in the
target region we are actually creating a kernel that is called at
registration. Because the ctor is a kernel we need to make sure it's
externally visible so we can actually call it. This prevented AMDGPU
from correctly using constructors while NVPTX could use them simply
because it ignored internal visibility.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Changing approach, we should optionally use internal linkage for the ctor
creation function since it's not correct to add the internal linkage attributes
and then make it external. Also remove it from the used global since it's not
needed anymore.
Comment Actions
I'm not actually sure what having protected visibility would do considering it's not applied with -fvisibility=protected like we pass currently.