[llvm] [RISCV] Set a barrier between mask producer and user of V0 (PR #114012)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 16:43:31 PDT 2024


preames wrote:

> Can you help me understand how this leads to making live intervals of mask registers shorter?

I think the idea is that the artificial edge constrains the scheduler from reordering the mask producer with the earlier mask use, thus preserving a non-overlapping live range if one already exists.  My question is why we need this?  Shouldn't register pressure on the mask register class (which only has one register) achieve this result?  It clearly doesn't, but why?  Is there something else we could tweak here?

Note that this code doesn't appear to consider the case where the original schedule already has V0 live ranges which overlap.  That's probably fixable with some one use checks.  

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


More information about the llvm-commits mailing list