[llvm] AMDGPU/PromoteAlloca: Refactor into analysis / commit phases (PR #170512)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 05:30:59 PST 2025


================
@@ -320,42 +379,63 @@ bool AMDGPUPromoteAllocaImpl::run(Function &F, bool PromoteToLDS) {
                                   : (MaxVGPRs * 32)) /
       VGPRBudgetRatio;
 
-  SmallVector<AllocaInst *, 16> Allocas;
+  std::vector<AllocaAnalysis> Allocas;
----------------
nhaehnle wrote:

The `AllocaAnalysis` structure is so big (it contains a bunch of SmallVectors itself) that trying to use it with `SmallVector` causes a static assertion.

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


More information about the llvm-commits mailing list