[llvm] [VPlan] Try to hoist Previous (and operands), if sinking fails for FORs. (PR #108945)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 08:13:17 PDT 2024


================
@@ -36,11 +36,13 @@ struct VPlanTransforms {
                                 GetIntOrFpInductionDescriptor,
                             ScalarEvolution &SE, const TargetLibraryInfo &TLI);
 
-  /// Sink users of fixed-order recurrences after the recipe defining their
-  /// previous value. Then introduce FirstOrderRecurrenceSplice VPInstructions
-  /// to combine the value from the recurrence phis and previous values. The
-  /// current implementation assumes all users can be sunk after the previous
-  /// value, which is enforced by earlier legality checks.
+  /// Try to have all users of fixed-order recurrences appear after the recipe
+  /// defining their previous value, by either sinking or hoisting the recipe
+  /// defining their previous value (and its operands). Then introduce
----------------
ayalz wrote:

```suggestion
  /// defining their previous value, by either sinking users or hoisting
  /// recipes defining their previous value. Then introduce
```
(sinking users may require additional sinkings, and hoisting previous may require additional hoistings.)

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


More information about the llvm-commits mailing list