[llvm] [AMDGPU] Extend promotion of alloca to vectors (PR #127973)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 01:06:14 PST 2025


================
@@ -66,6 +66,18 @@ static cl::opt<unsigned> PromoteAllocaToVectorLimit(
     cl::desc("Maximum byte size to consider promote alloca to vector"),
     cl::init(0));
 
+static cl::opt<unsigned> PromoteAllocaToVectorMaxElements(
+    "amdgpu-promote-alloca-to-vector-max-elements",
+    cl::desc("Maximum vector size (in elements) to use when promoting alloca"),
+    cl::init(16));
----------------
arsenm wrote:

Should turn these into pass parameters instead of opts.

Elements seems like a strange way to express this. Ideally we would pack the sub-32-bit element vectors into access of 32-bit vector 

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


More information about the llvm-commits mailing list