This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Allow PAL to put RO global in .text or .rodata
Needs ReviewPublic

Authored by tpr on May 19 2020, 1:27 AM.

Details

Summary

In LLPC (PAL OS type), I would like to be able to choose whether an RO
constant goes in .text with a relative fixup to reference it (for full
pipeline compilation) or in .rodata with a reloc to reference it (shader
compilation).

This commit allows that. LLPC will override the global's section name
with ".text" to get the global into .text.

Change-Id: I14c9525225572a16f0c01d394565e6ebfa39456d

Diff Detail

Event Timeline

tpr created this revision.May 19 2020, 1:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2020, 1:28 AM
tpr added a reviewer: nhaehnle.
tpr updated this revision to Diff 265349.May 20 2020, 2:32 PM

V2: Fixed tests.

tpr added a reviewer: s-perron.

This looks reasonable to me, but I am not an owner of this code.