[PATCH] D116669: [NFC][regalloc] Pass RAGreedy to eviction adviser
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 09:29:15 PST 2022
mtrofin created this revision.
mtrofin added reviewers: qcolombet, davidxl, MatzeB, wenlei.
Herald added a subscriber: hiraditya.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch simplifies the interface between RAGreedy and the eviction
adviser by passing the allocator to the adviser, which allows the latter
to extract needed information as needed, rather than requiring it be passed
piecemeal at construction time (which would also complicate later
evolution).
Part of this, the patch also moves ExtraRegInfo back to RAGreedy. We
keep the encapsulation of ExtraRegInfo because it has benefits (e.g.
improved readability by abstracting access to the cascade info) and also
simpler re-initialization at regalloc pass re-entry time (we just flush
the Optional).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116669
Files:
llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
llvm/lib/CodeGen/RegAllocEvictionAdvisor.h
llvm/lib/CodeGen/RegAllocGreedy.cpp
llvm/lib/CodeGen/RegAllocGreedy.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116669.397616.patch
Type: text/x-patch
Size: 13104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220105/30bb736e/attachment.bin>
More information about the llvm-commits
mailing list