[llvm] [CodeGen][NewPM] Port RegAllocEvictionAdvisor analysis to NPM (PR #117309)

Akshat Oke via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 29 01:31:59 PST 2024


optimisan wrote:

Updated the NPM analysis to be a MachineFunction analysis.
- The analysis result is a pointer to the provider (pointer is owned by this analysis class, which lives throughout the pipeline run). So in NPM do `getResult<REAdvAnalysis>(MF).Provider.getAdvisor(MF, RAGreedy)`
- This analysis `::run` sets the new analysis to the same provider object.
- The provider is only invalidated if MBFI and MachineLoopInfo are invalidated since the provider's analyses are set by this `::run` (I could pass in the analyses in the `getAdvisor(MF, RAGreedy, MBFI, Loops)` method instead)

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


More information about the llvm-commits mailing list