This patch introduces the priority analysis and the priority advisor,
the default implementation, and the scaffolding for introducing the
other implementations of the advisor.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
overall lgtm. in addition to the comments, also add a test similar to https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll - the idea is to check that, indeed, if the user asks for the unsupported advisor, the error message is given.
llvm/lib/CodeGen/RegAllocGreedy.cpp | ||
---|---|---|
2572 | I think Indexes is an analysis you could just get as a dependency of the regallocpriorityadvisoranalysis. Then that'd make the constructor simpler - ideally it would be reduced to just *MF and *this - it'll make it easier to evolve: we wouldn't need to touch N derived classes every time a N+1 one would need some new parameter - they could just get it from either the greedy allocator, or the analysis manager. |
I think Indexes is an analysis you could just get as a dependency of the regallocpriorityadvisoranalysis. Then that'd make the constructor simpler - ideally it would be reduced to just *MF and *this - it'll make it easier to evolve: we wouldn't need to touch N derived classes every time a N+1 one would need some new parameter - they could just get it from either the greedy allocator, or the analysis manager.