[llvm] [VPlan] Remove dead member functions (NFC) (PR #208936)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 11 11:45:09 PDT 2026
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/208936
Remove member functions with no remaining callers anywhere in the tree:
- VPExpressionRecipe::getOperandOfResultType
- VPBlockBase::getSingleHierarchicalSuccessor (the predecessor variant is still used and is kept)
- VPIRFlags::hasNonNegFlag (isNonNeg is still used)
- VPWidenIntOrFpInductionRecipe::getStartValue, which is an exact duplicate of the inherited VPWidenInductionRecipe::getStartValue.
>From 162cb8e02c866c7860e7b7c45f2b7f2964901497 Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo at fhahn.com>
Date: Fri, 19 Jun 2026 22:52:08 +0100
Subject: [PATCH] [VPlan] Remove dead member functions (NFC)
Remove member functions with no remaining callers anywhere in the tree:
- VPExpressionRecipe::getOperandOfResultType
- VPBlockBase::getSingleHierarchicalSuccessor (the predecessor variant is
still used and is kept)
- VPIRFlags::hasNonNegFlag (isNonNeg is still used)
- VPWidenIntOrFpInductionRecipe::getStartValue, which is an exact
duplicate of the inherited VPWidenInductionRecipe::getStartValue.
---
llvm/lib/Transforms/Vectorize/VPlan.h | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 1ce5786793c49..46e2ad4716323 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -258,12 +258,6 @@ class LLVM_ABI_FOR_TEST VPBlockBase {
return getEnclosingBlockWithSuccessors()->getSuccessors();
}
- /// \return the hierarchical successor of this VPBlockBase if it has a single
- /// hierarchical successor. Otherwise return a null pointer.
- VPBlockBase *getSingleHierarchicalSuccessor() {
- return getEnclosingBlockWithSuccessors()->getSingleSuccessor();
- }
-
/// \return the predecessors either attached directly to this VPBlockBase or,
/// if this VPBlockBase is the entry block of a VPRegionBlock and has no
/// predecessors of its own, search recursively for the first enclosing
@@ -1004,9 +998,6 @@ class VPIRFlags {
LLVM_ABI_FOR_TEST FastMathFlags getFastMathFlagsOrNone() const;
- /// Returns true if the recipe has non-negative flag.
- bool hasNonNegFlag() const { return OpType == OperationType::NonNegOp; }
-
bool isNonNeg() const {
assert(OpType == OperationType::NonNegOp &&
"recipe doesn't have a NNEG flag");
@@ -2653,9 +2644,6 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe,
"expandVPWidenIntOrFpInductionRecipe");
}
- /// Returns the start value of the induction.
- VPIRValue *getStartValue() const { return cast<VPIRValue>(getOperand(0)); }
-
/// If the recipe has been unrolled, return the VPValue for the induction
/// increment, otherwise return null.
VPValue *getSplatVFValue() const {
@@ -3647,14 +3635,6 @@ class VPExpressionRecipe : public VPSingleDefRecipe {
return new VPExpressionRecipe(ExpressionType, NewExpressiondRecipes);
}
- /// Return the VPValue to use to infer the result type of the recipe.
- VPValue *getOperandOfResultType() const {
- unsigned OpIdx =
- cast<VPReductionRecipe>(ExpressionRecipes.back())->isConditional() ? 2
- : 1;
- return getOperand(getNumOperands() - OpIdx);
- }
-
/// Insert the recipes of the expression back into the VPlan, directly before
/// the current recipe. Leaves the expression recipe empty, which must be
/// removed before codegen.
More information about the llvm-commits
mailing list