This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix allocating GDS globals to LDS offsets
ClosedPublic

Authored by arsenm on Apr 18 2022, 7:16 AM.

Details

Reviewers
rampitec
Group Reviewers
Restricted Project
Summary

These don't seem to be very well used or tested, but try to make the
behavior a bit more consistent with LDS globals.

I'm not sure what the definition for amdgpu-gds-size is supposed to
mean. For now I assumed it's allocating a static size at the beginning
of the allocation, and any known globals are allocated after it.

Diff Detail

Event Timeline

arsenm created this revision.Apr 18 2022, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2022, 7:16 AM
arsenm requested review of this revision.Apr 18 2022, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2022, 7:16 AM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec accepted this revision.Apr 18 2022, 11:24 AM
rampitec added a subscriber: rampitec.

LGTM with the assert added.

llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
71

Assert the AS is REGION?

This revision is now accepted and ready to land.Apr 18 2022, 11:24 AM