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

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 04:28:16 PDT 2024


lukel97 wrote:

> hasSameAVL can simply return false when ValNo is nullptr on either side.

Setting ValNo to nullptr is what I had tried initially, but the snag that I ran into was that VSETVLIInfo::== was no longer reflexive and I ran into some infinite cycles, presumably because computeIncomingVLVTYPE kept on adding successors to the worklist since it the terminating condition `if (BBInfo.Exit == TmpStatus)` never held. The assertion at the end of RISCVInsertVSETVLI::emitVSETVLIs` also failed.

But I do agree that it would be nicer to avoid the dummy values, I'll give this another try. Maybe we could redefine == to not use hasSameAVL. I think we may be conflating it a bit with the notion of "being compatible" which is what VSETVLIInfo::isCompatible is for.

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


More information about the llvm-commits mailing list