[PATCH] D149340: [AMDGPU] Place global constructors in .init_array and .fini_array
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 09:23:30 PDT 2023
jhuber6 added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp:76
+ if (!AlreadyRegistered)
+ IRB.CreateCall(ConstructorTy, CS->getOperand(1));
}
----------------
yaxunl wrote:
> jhuber6 wrote:
> > yaxunl wrote:
> > > I noticed these functions are called not following the priority.
> > >
> > > However, I guess that is out of the scope of this patch.
> > True, it was like that when I got here. Do you know who the current user is for this feature?
> Currently, all HIP programs use this feature when -fsanitize=addr is used.
>
> But they do not care about priority yet.
FWIW we could change this to be a single kernel that calls an ASAN library function, which implements the method in the commit header to traverse the list in priority order.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149340/new/
https://reviews.llvm.org/D149340
More information about the llvm-commits
mailing list