[llvm] Limit Alloca->LDS promotion based on speculations as to eventual register pressure (PR #152814)
Tim Gymnich via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 9 07:55:13 PDT 2025
================
@@ -100,6 +106,14 @@ class AMDGPUPromoteAllocaImpl {
unsigned VGPRBudgetRatio;
unsigned MaxVectorRegs;
+ std::unordered_map<BasicBlock *, std::unordered_set<Instruction *>>
----------------
tgymnich wrote:
Depending on density of your map one could use `getNumber()` on `BasicBlock` to get a unique number for mapping.
E.g. this could be a SmallVector of sets with a size of F.getMaxBlockNumber().
For the set I'd suggest using a `SmallPtrSet` instead.
https://github.com/llvm/llvm-project/pull/152814
More information about the llvm-commits
mailing list