[llvm] [VPlan] Introduce VPValue::user_empty (NFC) (PR #203518)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 03:35:53 PDT 2026
artagnon wrote:
> > I think we should go down that direction: adding has(No)Users first, then I can update #157956 to add the remaining helpers to completely remove explicit `getNumUsers`(which is a bit misleading)
>
> Sounds good to me: I agree that getNumUsers is misleading, and that we should strip it. Let me know if anything else needs to be done for this patch.
We can't eliminate getNumUsers unfortunately -- there is code like this:
```cpp
VPInstruction *I2 =
new VPInstruction(Instruction::Add, {VPV1, VPV2},
VPIRFlags::getDefaultFlags(Instruction::Add));
EXPECT_EQ(3u, VPV1->getNumUsers());
VPV1->replaceAllUsesWith(VPV3);
EXPECT_EQ(3u, VPV3->getNumUsers());
```
For now, let's just go with the modest user_empty improvement.
https://github.com/llvm/llvm-project/pull/203518
More information about the llvm-commits
mailing list