[llvm] [VPlan] Don't collect live-ins in collectUsersInExitBlocks. (NFC) (PR #123819)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 13:27:12 PST 2025


================
@@ -9077,11 +9081,6 @@ addUsersInExitBlocks(VPlan &Plan,
   // modeling the corresponding LCSSA phis.
   for (VPIRInstruction *ExitIRI : ExitUsersToFix) {
     for (const auto &[Idx, Op] : enumerate(ExitIRI->operands())) {
-      // Pass live-in values used by exit phis directly through to their users
-      // in the exit block.
----------------
fhahn wrote:

Sounds good, I added `VPIRInstruction::extractLastLaneOfOperand`, is that along the lines you had in mind?

Now that all live-outs are handled in VPlan I am planning to look into simplifying and unifying the place where we handle the exit users. If/once there's support for reductions/first-order recurrences for early exit loops, I think they should ideally also handled directly in `handleUncountableEarlyExit`, but that's for another day :)

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


More information about the llvm-commits mailing list