This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Refactor PromoteAlloca implementation
ClosedPublic

Authored by Pierre-vh on Apr 17 2023, 6:26 AM.

Details

Summary

We're getting a lot of mileage out of PromoteAlloca, and the pass had grown somewhat organically over the year.
This patch attempts to clean up the implementation and restructure it. For instance,
the exact same code path is now used for both promote alloca to LDS and
promote alloca to vector - just with different parameters.
This removes some redundancy here and there.
I also reordered functions in a way that hopefully makes more sense (e.g. all of the pass API is in the same place)

No functionality change is intended in the patch, but some checks were movved around so I'm not using the NFC tag.

Diff Detail

Event Timeline

Pierre-vh created this revision.Apr 17 2023, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 6:26 AM
Pierre-vh requested review of this revision.Apr 17 2023, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 6:26 AM
arsenm accepted this revision.Apr 18 2023, 4:54 AM
This revision is now accepted and ready to land.Apr 18 2023, 4:54 AM
This revision was landed with ongoing or failed builds.Apr 18 2023, 5:24 AM
This revision was automatically updated to reflect the committed changes.