[all-commits] [llvm/llvm-project] e14d04: [SplitKit] Handle early clobber + tied to def corr...

Kito Cheng via All-commits all-commits at lists.llvm.org
Tue Jun 7 20:33:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e14d04909df4e52e531f6c2e045c3cf9638dd817
      https://github.com/llvm/llvm-project/commit/e14d04909df4e52e531f6c2e045c3cf9638dd817
  Author: Kito Cheng <kito.cheng at sifive.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M llvm/lib/CodeGen/SplitKit.cpp
    M llvm/test/CodeGen/RISCV/early-clobber-tied-def-subreg-liveness.ll
    M llvm/test/CodeGen/RISCV/early-clobber-tied-def-subreg-liveness.mir

  Log Message:
  -----------
  [SplitKit] Handle early clobber + tied to def correctly

Spliter will try to extend a live range into `r` slot for a use operand,
that's works on most situaion, however that not work correctly when the operand
has tied to def, and the def operand is early clobber.

Give an example to demo what's wrong:
  0  %0 = ...
 16  early-clobber %0 = Op %0 (tied-def 0), ...
 32  ... = Op %0

Before extend:
 %0 = [0r, 0d) [16e, 32d)

The point we want to extend is 0d to 16e not 16r in this case, but if
we use 16r here we will extend nothing because that already contained
in [16e, 32d).

This patch add check for detect such case and adjust the extend point.

Detailed explanation for testcase: https://reviews.llvm.org/D126047

Reviewed By: MatzeB

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




More information about the All-commits mailing list