D61491 caused us to use relocs when they're not strictly necessary, to
refer to symbols in the text section. This is a pessimization and it's a
problem for some loaders that don't support relocs yet.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Hmm, those test changes were unexpected.
Could you please change shouldEmitConstantsToTextSection to check for == AMDPAL instead? This really doesn't make sense for Mesa... and then add a test that explicit sets amdpal in the triple?
Done. global-constant.ll seems to test the HAS/non-HSA (now PAL/non-PAL) difference quite well. I don't know what to make of the other test changes -- I just did what I needed to to make them pass.
FWIW, this LGTM. Maybe it would be a good idea to add more lines to global-constant.ll to test radeonsi (amdgcn-- at the moment) and radv (amdgcn-mesa-mesa3d) under the NOPAL label.
I believe the no-initializer-constant-addrspace.ll test change is because it uses the external linkage and a non-PAL OS, so we emit an extra global offset table lookup once the workaround is removed, but that's normal and shouldn't matter for what it's testing. The R600 change is just due to it getting a separate section and also seems fine.