Page MenuHomePhabricator

[NFC][Regalloc] Introduce the RegAllocPriorityAdvisorAnalysis
ClosedPublic

Authored by Flpha0830 on Mon, Aug 29, 1:52 AM.

Details

Summary

This patch introduces the priority analysis and the priority advisor,
the default implementation, and the scaffolding for introducing the
other implementations of the advisor.

Diff Detail

Event Timeline

Flpha0830 created this revision.Mon, Aug 29, 1:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Aug 29, 1:52 AM
Flpha0830 requested review of this revision.Mon, Aug 29, 1:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Aug 29, 1:52 AM

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.

Flpha0830 updated this revision to Diff 457837.Sat, Sep 3, 11:05 PM

make the constuctor simpler, modify pipelines and add a test

Flpha0830 updated this revision to Diff 457839.Sat, Sep 3, 11:14 PM

change format

Flpha0830 updated this revision to Diff 457843.Sun, Sep 4, 12:21 AM

fix the pipeline

mtrofin accepted this revision.Tue, Sep 6, 8:20 AM

lgtm

This revision is now accepted and ready to land.Tue, Sep 6, 8:20 AM
This revision was automatically updated to reflect the committed changes.