[PATCH] D113525: [NFC][regalloc] Factor eviction decision-making into an analysis

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 9 15:58:50 PST 2021


mtrofin created this revision.
mtrofin added reviewers: qcolombet, davidxl.
Herald added subscribers: hiraditya, mgorny, MatzeB.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The goal is to support alternative policies for eviction, e.g. via
ML-trained policy. Such alternatives would be made available as
alternative implementations of RegAllocEvictionAdvisor, and the
RegAllocEvictionAdvisorAnalysis would make the switch between them.

The bulk of the change moves code from RegAllocGreedy.cpp to the
advisor. The change also renames `canEvictInterference` to
`shouldEvictInterference` to suggest this is a question of
profitability, not necessarily correctness.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113525

Files:
  llvm/include/llvm/InitializePasses.h
  llvm/lib/CodeGen/CMakeLists.txt
  llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
  llvm/lib/CodeGen/RegAllocEvictionAdvisor.h
  llvm/lib/CodeGen/RegAllocGreedy.cpp
  llvm/test/CodeGen/Generic/llc-start-stop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113525.386002.patch
Type: text/x-patch
Size: 54534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211109/d6f79416/attachment.bin>


More information about the llvm-commits mailing list