[llvm] [Support] Use bump ptr allocator for domtree nodes (PR #102516)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 18 03:34:34 PST 2026


nikic wrote:

> I investigated the ThinLTO max-rss regression. ModuleSummaryIndexAnalysis keeps all DomTrees in memory at the same time, were the small waste of every DomTree adds up. 

I wonder to what degree this is intentional. I assume the relevant code is https://github.com/llvm/llvm-project/blob/f4de9b89e9489deda24b6143c574ee8688d4a734/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp#L1061-L1071 which constructs a local DominatorTree -- but then fetches BFI from the FAM, which is going to construct a separate DominatorTree. 

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


More information about the llvm-commits mailing list