[llvm] [VPlan] Explicitly handle scalar pointer inductions. (PR #83068)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 10 16:55:08 PDT 2024


================
@@ -1164,11 +1168,19 @@ class VPInstruction : public VPRecipeWithIRFlags {
   /// An optional name that can be used for the generated IR instruction.
   const std::string Name;
 
-  /// Utility method serving execute(): generates a single instance of the
-  /// modeled instruction. \returns the generated value for \p Part.
-  /// In some cases an existing value is returned rather than a generated
+  /// Returns true if this VPInstruction generates scalar values only.
+  bool doesGenerateScalars() const;
----------------
ayalz wrote:

nit: add `Only` at the end, or at the beginning - onlyScalarsGenerated(), as in VPWidenPointerInductionRecipe above?

It's somewhat confusing, given VPInstructions such as ComputeReductionResult that also generate scalar(s) are excluded. See more below.

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


More information about the llvm-commits mailing list