[llvm] [VPlan] Introduce scalar loop header in plan, remove VPLiveOut. (PR #109975)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 13:20:59 PDT 2024


fhahn wrote:

> I just noticed this patch today. I have a patch to enable vectorisation of more early exit loops that require adding live outs from the early exiting block - #88385. I hadn't realised that VPLiveOuts were going to be removed from the vplan.
> 
> @fhahn If possible, can you point me at the patch or code that shows how we model outside uses of loop values in the exit block? I will need to update PR #88385 to ensure we generate the correct final value in the early exit block.

I think we should already have most of the pieces needed to model the exit values in the early exit the same way as for the regular exits after introducing VPIRBasicBlocks and VPIRInstructions. https://github.com/llvm/llvm-project/pull/100735 uses those for the regular exit phis.

It should be possible create a VPIRBasicBlock for the early exit block in a similar fashion and add operands to the VPIRInstructions of the phis that need updating.

A few small changes may be needed to support VPIRBBs and VPIRInst phis with multiple predecessors, but hopefully something like 3cfe25bf43feaf94d319c7f804e5c73c45f96057 should be enough.

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


More information about the llvm-commits mailing list