[llvm] [RISCV] Teach RISCVInsertVSETVLI to work without LiveIntervals (PR #94686)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 10:09:49 PDT 2024


lukel97 wrote:

> @lukel97 I just had a thought. We still have MRI after vector regalloc, and while we can't be guaranteed to find a unique definition, MRI does have means for cheaply getting a unique definition if one exists. You see any reason why we can't opportunistically use that in hasNonZeroAVL, and hasSameAVL? We couldn't easily use it during state merging, but off the top of my head I'm not seeing any reason that compatibility style reasoning can't?

If by opportunistically you mean use MachineRegisterInfo::getUniqueVRegDef and then fall back to VNInfo if it's null, I think that could work. We only really need VNInfo for the cases where the AVL came from an eliminated phi. Agreed, sounds like a reasonable route if we want to recover those O0 regressions.

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


More information about the llvm-commits mailing list