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

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 14:35:00 PDT 2024


================
@@ -8957,7 +8941,14 @@ static void addLiveOutsForFirstOrderRecurrences(
         VPInstruction::ResumePhi, {Resume, FOR->getStartValue()}, {},
         "scalar.recur.init");
     auto *FORPhi = cast<PHINode>(FOR->getUnderlyingInstr());
-    Plan.addLiveOut(FORPhi, ResumePhiRecipe);
+    for (VPRecipeBase &R :
+         *cast<VPIRBasicBlock>(ScalarPHVPBB->getSingleSuccessor())) {
----------------
ayalz wrote:

 nit: deserves to be set above as
```suggestion
  auto *ScalarHeaderVPIRBB = cast<VPIRBasicBlock>(ScalarPHVPBB->getSingleSuccessor());
```
or rather 
```
  auto *ScalarHeaderVPIRBB = Plan.getScalarHeader();
```
?

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


More information about the llvm-commits mailing list