This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Enable PIC by default for amdgcn
ClosedPublic

Authored by kzhuravl on Feb 8 2018, 3:31 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

kzhuravl created this revision.Feb 8 2018, 3:31 PM
kzhuravl removed a subscriber: msearles.
msearles accepted this revision.Feb 8 2018, 3:42 PM

LGTM

This revision is now accepted and ready to land.Feb 8 2018, 3:42 PM
kzhuravl planned changes to this revision.Feb 8 2018, 3:50 PM
kzhuravl requested review of this revision.Feb 8 2018, 4:39 PM
This revision is now accepted and ready to land.Feb 8 2018, 4:39 PM

I thought we could override isPICDefault in AMDGPUToolChain instead of doing what is posted. But AMDGPUToolChain is only created for AMDHSA OS.

Do we want to enable PIC by default for all AMDGCNs? Or only for AMDHSA?

t-tye accepted this revision.Feb 14 2018, 1:41 PM

For now seems reasonable to fix amdgpu as PIC. If/when other clients of amdgpu have tool chains defined then can switch to controling in the toolchain isPICDefault() function.

This revision was automatically updated to reflect the committed changes.