[all-commits] [llvm/llvm-project] e4e95f: [LiveIntervals] Repair live intervals that gain su...

Jay Foad via All-commits all-commits at lists.llvm.org
Fri Sep 24 04:02:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e4e95f14f15aceb2641c2b917eca58aaf988c4a7
      https://github.com/llvm/llvm-project/commit/e4e95f14f15aceb2641c2b917eca58aaf988c4a7
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveIntervals.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-mul24-knownbits.ll
    M llvm/test/CodeGen/Hexagon/isel-extload-i1.ll
    M llvm/test/CodeGen/Thumb2/mve-ctlz.ll

  Log Message:
  -----------
  [LiveIntervals] Repair live intervals that gain subranges

In repairIntervalsInRange, if the new instructions refer to subregs but
the old instructions did not, make sure any existing live interval for
the superreg is updated to have subranges. Also skip repairing any range
that we have recalculated from scratch, partly for efficiency but also
to avoids some cases that repairOldRegInRange can't handle.

The existing test/CodeGen/AMDGPU/twoaddr-regsequence.mir provides some
test coverage for this change: when TwoAddressInstructionPass converts
REG_SEQUENCE into subreg copies, the live intervals will now get
subranges and MachineVerifier will verify that the subranges are
correct. Unfortunately MachineVerifier does not complain if the
subranges are not present, so the test also passed before this patch.

This patch also fixes ~800 of the ~1500 failures in the whole CodeGen
lit test suite when -early-live-intervals is forced on.

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




More information about the All-commits mailing list