[all-commits] [llvm/llvm-project] e12126: [NFC][regalloc] Pass RAGreedy to eviction adviser

Mircea Trofin via All-commits all-commits at lists.llvm.org
Mon Jan 10 11:56:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e12126913139bb42be1faaefea62eaaa80509626
      https://github.com/llvm/llvm-project/commit/e12126913139bb42be1faaefea62eaaa80509626
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2022-01-10 (Mon, 10 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
    M llvm/lib/CodeGen/RegAllocEvictionAdvisor.h
    M llvm/lib/CodeGen/RegAllocGreedy.cpp
    M llvm/lib/CodeGen/RegAllocGreedy.h

  Log Message:
  -----------
  [NFC][regalloc] Pass RAGreedy to eviction adviser

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).

Differential Revision: https://reviews.llvm.org/D116669




More information about the All-commits mailing list