[llvm] [Hexagon] Use LiveRegUnits (PR #84112)

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 04:59:25 PST 2024


kparzysz wrote:

> I tried but then tests started failing, so I cannot do that.

The `IsLive` function checks if the register is in use (i.e. live).  We then use it to set the kill flag on it: if the register is not live, then the use of it that we see (we're going backwards here) is the last one, so it's a kill.  The `available` function in LiveRegUnits does exactly what `IsLive` is doing here.  In this context "available" means "not in use", i.e. not live.

Is you replace the use of `IsLive` with `!available` it should work.

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


More information about the llvm-commits mailing list