[llvm] [ReachingDefAnalysis] Extend the analysis to stack objects. (PR #118097)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 25 05:37:32 PST 2025


michaelmaitland wrote:

> > Here is a suggestion on how to rework the MBBFrameObjsReachingDefsInfo data structure [here](https://github.com/llvm/llvm-project/compare/main...michaelmaitland:llvm-project:perf/mmaitland-rda-ss?expand=1)
> > You can see that it does not have the "catastrophic memory usage regressions" [here](https://llvm-compile-time-tracker.com/compare.php?from=beba4b08f72152abbb7d26df024f0d9338a7038b&to=a51148b62cee5f01e3bbb6dd3e7608a1ea274388&stat=max-rss)
> > Feel free to take it verbatim or make your own modifications to it.
> 
> @michaelmaitland Thanks for fixing the regression! I think you can commit your change in a separate PR. Right now the `AllReachingDefs` uses `std::vector`s. Can you modify that to use `DenseMap` like you suggested? Then I can rebase my PR on yours and I'll get rid of the `MBBFrameObjsReachingDefsInfo` so both physical registers and stack slots use the same data structure.

I’m not sure I follow what you mean. I’m not sure how I’d commit my changes first when they depend on your addition of MBBFrameObjsReachingDefsInfo. In addition, I’m not sure where I suggested anything about `AllReachingDefs` in the patch I shared. 

Could you please prepare whatever PRs you have in mind / update this one accordingly (feeling free to use the code that fixes the memory usage however you like)?

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


More information about the llvm-commits mailing list