[PATCH] D118674: [nfc][mlgo][regalloc] Cache live interval feature components

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 19:23:13 PST 2022


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

The features we cache are those that participate in weight computation,
just that we don't further aggregate them into a final number. To
maintain and invalidate the cache, we implement a VirtRegAuxInfo. The
features are lazily computed, and invalidated whenever
`calculateSpillWeightAndHint` is called (which is now virtual).

An effect of this is that VirtRegAuxInfo creation and ownership is on each advisor.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118674

Files:
  llvm/include/llvm/CodeGen/CalcSpillWeights.h
  llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp
  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: D118674.404783.patch
Type: text/x-patch
Size: 7570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220201/af6b5861/attachment-0001.bin>


More information about the llvm-commits mailing list