[llvm] [VPlan] Generalize collectUsersInExitBlocks for multiple exit bbs. (PR #115066)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 06:51:35 PST 2024


david-arm wrote:

Hi @fhahn, it doesn't look like https://github.com/llvm/llvm-project/pull/112138 has to deal with users of exit values, which this patch says it's in preparation for. Do you plan to expand the scope of PR #112138 to include more of PR #88385?

I am very grateful for your help and feedback in trying to drive PR #88385 forward, but I was under the impression that PR #112138 was simply presenting an alternative basic skeleton for handling multiple loop region successors in VPlan, from which I could then continue to drive PR #88385 forwards.

I'm not against doing it the way you've presented here, but the reason my patch separates them on different lists is because you need to calculate the final value in a different way to normal exits and so this PR would be functionally incorrect. You can't use ExtractFromEnd recipe because we cannot extract from the end of vector - we must extract from the lane that triggered the exit and you can see how I've done this in https://github.com/david-arm/llvm-project/tree/ee_autovec2. Also, I was planning with https://github.com/llvm/llvm-project/pull/88385 to put the early exit autovec support in incrementally in smaller patches to make it easier for reviewers, i.e.:

1. Add support for early exit autovec for loops with no live-outs. That avoids having to worry about the different handling required for users of loop-defined values in early exit blocks, and significantly reduces the size of the patch.
2. Add support for loops with live-outs.

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


More information about the llvm-commits mailing list