[llvm] [VPlan] Avoid recursive-fan-out of usesFirstLaneOnly (PR #229130)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 02:18:33 PDT 2026
================
@@ -1570,14 +1570,76 @@ class LLVM_ABI_FOR_TEST VPInstruction : public VPRecipeWithIRFlags,
/// Returns true if the underlying opcode may read from or write to memory.
bool opcodeMayReadOrWriteFromMemory() const;
- /// Returns true if the recipe only uses the first lane of operand \p Op.
- bool usesFirstLaneOnly(const VPValue *Op) const override;
+ /// Returns a VPRecurseResult to determine whether the recipe only uses the
+ /// first lane of operand \p Op.
+ VPRecurseResult usesFirstLaneOnly(const VPValue *Op) const override {
----------------
fhahn wrote:
how important is it to have the general helper recurse? Could we have a targeted helper (outside `VPRecipeBase`) that does the recursion for VPInstructioins and update the users that need it to use it? That may also help with the compile-time?
https://github.com/llvm/llvm-project/pull/229130
More information about the llvm-commits
mailing list