[llvm] 536d78c - [VPlan] Remove VPInstruction::setUnderlyingInstr (NFCI).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 18 10:50:20 PST 2024
Author: Florian Hahn
Date: 2024-02-18T18:50:01Z
New Revision: 536d78c213e127e00aa3b120582a3c133e6b0e52
URL: https://github.com/llvm/llvm-project/commit/536d78c213e127e00aa3b120582a3c133e6b0e52
DIFF: https://github.com/llvm/llvm-project/commit/536d78c213e127e00aa3b120582a3c133e6b0e52.diff
LOG: [VPlan] Remove VPInstruction::setUnderlyingInstr (NFCI).
VPInstruction doesn't rely on the underlying instruction any longer for
codegen, remove the unneeded setUnderlyingInstr.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanSLP.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 13e1859ad6b250..42e3b4a003511b 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1177,9 +1177,6 @@ class VPInstruction : public VPRecipeWithIRFlags {
bool isFPMathOp() const;
#endif
-protected:
- void setUnderlyingInstr(Instruction *I) { setUnderlyingValue(I); }
-
public:
VPInstruction(unsigned Opcode, ArrayRef<VPValue *> Operands, DebugLoc DL,
const Twine &Name = "")
diff --git a/llvm/lib/Transforms/Vectorize/VPlanSLP.cpp b/llvm/lib/Transforms/Vectorize/VPlanSLP.cpp
index fbcadba33e6768..98ccf216946357 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanSLP.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanSLP.cpp
@@ -461,7 +461,6 @@ VPInstruction *VPlanSlp::buildGraph(ArrayRef<VPValue *> Values) {
assert(CombinedOperands.size() > 0 && "Need more some operands");
auto *Inst = cast<VPInstruction>(Values[0])->getUnderlyingInstr();
auto *VPI = new VPInstruction(Opcode, CombinedOperands, Inst->getDebugLoc());
- VPI->setUnderlyingInstr(Inst);
LLVM_DEBUG(dbgs() << "Create VPInstruction " << *VPI << " "
<< *cast<VPInstruction>(Values[0]) << "\n");
More information about the llvm-commits
mailing list