[llvm] [AMDGPU] Promote allocas used by phi/select (PR #221870)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 13 07:37:57 PDT 2026


================
@@ -103,16 +106,34 @@ struct MemTransferInfo {
 };
 
 // Analysis for planning the different strategies of alloca promotion.
+//
+// An AllocaAnalysis may represent one alloca or a group of allocas if they need
+// to be promoted together.
 struct AllocaAnalysis {
-  AllocaInst *Alloca = nullptr;
+  AllocaInst *Alloca = nullptr; // Primary member (lane 0).
----------------
arsenm wrote:

Why bless any particular alloca? Why not replace this with the SmallVector? If you need the special case it would just be Members[0]?

https://github.com/llvm/llvm-project/pull/221870


More information about the llvm-commits mailing list