[PATCH] D29214: [AMDGPU] Internalize non-kernel symbols
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 28 00:29:50 PST 2017
rampitec added inline comments.
================
Comment at: test/CodeGen/AMDGPU/internalize.ll:7-8
+
+ at gvar_unused = addrspace(1) global i32 undef, align 4
+ at gvar_used = addrspace(1) global i32 undef, align 4
+
----------------
rampitec wrote:
> kzhuravl wrote:
> > tony-tye wrote:
> > > rampitec wrote:
> > > > arsenm wrote:
> > > > > Should this check with various linkage types that should remain visible?
> > > > As long as there is no late linking there are no linkages which should remain visible. Do you have an example?
> > > The HSA Runtime can be used to query the address of global symbols so that the host program can access them. Will that still work after this phase?
> > After this phase, if global symbol is unused, it would be removed. So it wouldn't be present in the object code. Hence hsa runtime won't know about it, and it would be inaccessible.
> That is right, but should it remain visible for RT if unused in kernels? Do we have a test for this?
It will remain untouched and accessible from RT as long as it is used from GPU side. If no kernels or functions they call access such variables they will be eliminated. Do we expect anything different?
Repository:
rL LLVM
https://reviews.llvm.org/D29214
More information about the llvm-commits
mailing list