[llvm] [AMDGPU] Limit promoting allocas that have users with dynamic index above a threshold on number of elements (PR #170327)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 3 11:29:56 PST 2025


================
@@ -85,6 +85,12 @@ static cl::opt<unsigned>
                             "when sorting profitable allocas"),
                    cl::init(4));
 
+static cl::opt<unsigned> DynamicIndexNumberElementLimit(
----------------
shiltian wrote:

Need test to cover different values.

Nit: I'd probably make the option name something like `amdgpu-promote-alloca-dynamic-index-num-element-limit`; otherwise it might be confusing.

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


More information about the llvm-commits mailing list