[llvm] [CodeGen] Let RDA recompute live-ins. (PR #166773)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 8 11:15:50 PST 2026


lenary wrote:

(We talked offline about this)

I don't think there's an obligation for RDA to update the live-in information. It just needs to signal that a value might have also been a live-in, even if there are also defining instructions.

For example:
```
; int foo(int a) ; effectively live-in a0
  beqz a0, %bb2
  addi a0, zero, 1
%bb2:
  slli a0, a0, 25
  ret
```

In this case, the `a0` of the `slli` will only have the `addi` returned in the set of global reaching defs, which doesn't tell you that the `a0` could have been defined before this function was executed. That's all I want the API to be able to tell me, which it cannot right now.

The `a0` in `beqz` is different, as it is only reached from a live-in, so the set of global reaching defs will be empty, which implicitly says `a0` is a live-in.

https://github.com/llvm/llvm-project/pull/166773


More information about the llvm-commits mailing list