This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix not accounting for constantexpr uses of LDS globals
ClosedPublic

Authored by arsenm on Jul 17 2020, 5:27 PM.

Details

Summary

This was failing to add the size of LDS globals that weren't directly
used by an instruction. They could be used by constant expressions
which are transitively used by the function. This requires a better
search, but just abort on this for now for correctness.

Diff Detail

Event Timeline

arsenm created this revision.Jul 17 2020, 5:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2020, 5:27 PM
hliao accepted this revision.Jul 20 2020, 8:15 AM

LGTM as a quick fix.

llvm/test/CodeGen/AMDGPU/promote-alloca-to-lds-constantexpr-use.ll
8

We may add 'FIXME' as well to keep these tests tracked as well.

This revision is now accepted and ready to land.Jul 20 2020, 8:15 AM
arsenm marked an inline comment as done.Jul 20 2020, 8:31 AM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/promote-alloca-to-lds-constantexpr-use.ll
8

No need, D84168 fixes this