[llvm] [VPlan] Introduce explicit ExtractFromEnd recipes for live-outs. (PR #100658)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 04:09:43 PDT 2024
================
@@ -8660,6 +8757,14 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
// After here, VPBB should not be used.
VPBB = nullptr;
+ assert(isa<VPRegionBlock>(Plan->getVectorLoopRegion()) &&
+ !Plan->getVectorLoopRegion()->getEntryBasicBlock()->empty() &&
+ "entry block must be set to a VPRegionBlock having a non-empty entry "
+ "VPBasicBlock");
+ RecipeBuilder.fixHeaderPhis();
+
+ addLiveOutsForFirstOrderRecurrences(*Plan);
----------------
fhahn wrote:
> Now that addLiveOutsForFirstOrderRecurrences() moves to be ahead of addUsersInExitBlock() - could the former add all live-outs of FORs, both those in scalar header and those in exit block (when scalar epilog isn't required)?
Yes, done!
> Independent, while we're here: name should be addLiveOutsForFixedOrderRecurrences() - as it deals with FOR's of distance >= 1, right? May be a bit confusing, along with "optimizing" the extract of v2's penultimate value instead of v3's last value.
At this point, we only have chains for first order recurrences, but could be changed once we optimize further?
https://github.com/llvm/llvm-project/pull/100658
More information about the llvm-commits
mailing list