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

Kevin Choi via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 3 11:13:43 PST 2025


choikwa wrote:

> Is the fundamental limit here actually the number of elements in the GEP type, or rather the width of the GEP type in 32b VGPRs? I guess alignment (or rather misalignment) drives the complexity explosion?

It looks like the IR count in SDag scales linearly with number of elements (roughly 4x after legalization etc per extract/insert). Problem seems especially bad in GreedyRA with O(n^2) or O(nlogn) interference check as seen in the compilation profile.

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


More information about the llvm-commits mailing list