This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Account for the size of LDS globals used through constant expressions.
ClosedPublic

Authored by arsenm on Jul 20 2020, 5:59 AM.

Details

Summary

Also "fix" the longstanding bug where the computed size depends on the
order of the visitation. We could try to predict the allocation order
used by legalization, but it would never be 100% perfect. Until we
start fixing the addresses somehow (or have a more reliable allocation
scheme later), just try to compute the size based on the worst case
padding.

Diff Detail

Event Timeline

arsenm created this revision.Jul 20 2020, 5:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2020, 5:59 AM
arsenm updated this revision to Diff 279222.Jul 20 2020, 6:28 AM

Early exit

rampitec accepted this revision.Jul 28 2020, 3:46 PM

LGTM with a nit.

llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
808

Could use llvm::sort instead.

This revision is now accepted and ready to land.Jul 28 2020, 3:46 PM