[PATCH] D148526: [AMDGPU] Refactor PromoteAlloca implementation

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 06:26:45 PDT 2023


Pierre-vh created this revision.
Pierre-vh added reviewers: arsenm, foad, rampitec.
Herald added subscribers: kosarev, StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
Pierre-vh requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148526

Files:
  llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148526.514198.patch
Type: text/x-patch
Size: 31071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/38df853e/attachment.bin>


More information about the llvm-commits mailing list