[llvm] [VPlan] Simplify branch on False in VPlan transform (NFC). (PR #140409)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 14:14:36 PDT 2025


================
@@ -199,8 +200,12 @@ raw_ostream &operator<<(raw_ostream &OS, const VPRecipeBase &R);
 /// This class augments VPValue with operands which provide the inverse def-use
 /// edges from VPValue's users to their defs.
 class VPUser {
+  friend class VPPhiAccessors;
----------------
ayalz wrote:

Worth clarifying this discouraging motivation for `friend` - `removeOperand()` could be done by RAUW a new similar recipe built w/o the prescribed operand.

Currently `removeOperand()` is needed only by `removeIncomingValue()` for VPIRPhi's only. Suffice to provide `VPIRPhi::removeIncomingValueFor()` which would access a `protected` `removeOperand()`?

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


More information about the llvm-commits mailing list