[PATCH] D29214: [AMDGPU] Internalize non-kernel symbols

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 28 00:24:09 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
+
----------------
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?


Repository:
  rL LLVM

https://reviews.llvm.org/D29214





More information about the llvm-commits mailing list