This is an archive of the discontinued LLVM Phabricator instance.

[amdgpu][wip] Precise existing usage calculation in PromoteAllocaToLDS
Needs RevisionPublic

Authored by JonChesterfield on Jul 15 2023, 3:14 PM.

Details

Reviewers
arsenm
jmmartinez
Summary

WIP because test coverage is scarce. Known bug is dynamic LDS only
allocated in kernels will be missing abs metadata and from the frame
attribute.

Approach will be to use the precisely calculated frame layout from the previous
pass instead of recompute an approximation to it.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2023, 3:14 PM
JonChesterfield requested review of this revision.Jul 15 2023, 3:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2023, 3:14 PM
  • comment, need to allocate new var in frame
JonChesterfield edited the summary of this revision. (Show Details)Jul 15 2023, 3:20 PM
JonChesterfield added a subscriber: ronl.
arsenm added inline comments.Jul 22 2023, 11:08 AM
llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
885–887

Just say kernels, don't spell out the one that we only try to handle in random places

890

Break this into better names than .first/.second

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

Could just update these to add the new attribute?

arsenm requested changes to this revision.Aug 17 2023, 6:02 AM
This revision now requires changes to proceed.Aug 17 2023, 6:02 AM
llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp