[all-commits] [llvm/llvm-project] d40b49: [regalloc] Ensure Query::collectInterferringVregs ...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Tue Mar 16 12:19:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d40b4911bd9aca0573752e065f29ddd9aff280e1
      https://github.com/llvm/llvm-project/commit/d40b4911bd9aca0573752e065f29ddd9aff280e1
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/LiveIntervalUnion.h
    M llvm/lib/CodeGen/LiveIntervalUnion.cpp
    M llvm/lib/CodeGen/LiveRegMatrix.cpp
    M llvm/lib/CodeGen/RegAllocGreedy.cpp

  Log Message:
  -----------
  [regalloc] Ensure Query::collectInterferringVregs is called before interval iteration

The main part of the patch is the change in RegAllocGreedy.cpp: Q.collectInterferringVregs()
needs to be called before iterating the interfering live ranges.

The rest of the patch offers support that is the case: instead of  clearing the query's
InterferingVRegs field, we invalidate it. The clearing happens when the live reg matrix
is invalidated (existing triggering mechanism).

Without the change in RegAllocGreedy.cpp, the compiler ices.

This patch should make it more easily discoverable by developers that
collectInterferringVregs needs to be called before iterating.

I will follow up with a subsequent patch to improve the usability and maintainability of Query.

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




More information about the All-commits mailing list