[llvm] [VPlan] Add specialized VPValue subclasses for different types (NFC) (PR #172758)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 6 13:31:16 PST 2026
================
@@ -1169,20 +1180,17 @@ VPlan *VPlan::duplicate() {
// Create VPlan, clone live-ins and remap operands in the cloned blocks.
auto *NewPlan = new VPlan(cast<VPBasicBlock>(NewEntry), NewScalarHeader);
DenseMap<VPValue *, VPValue *> Old2NewVPValues;
- for (VPValue *OldLiveIn : getLiveIns()) {
- Old2NewVPValues[OldLiveIn] =
- NewPlan->getOrAddLiveIn(OldLiveIn->getLiveInIRValue());
- }
+ for (VPIRValue *OldLiveIn : getLiveIns())
+ Old2NewVPValues[OldLiveIn] = NewPlan->getOrAddLiveIn(OldLiveIn->getValue());
Old2NewVPValues[&VectorTripCount] = &NewPlan->VectorTripCount;
Old2NewVPValues[&VF] = &NewPlan->VF;
Old2NewVPValues[&VFxUF] = &NewPlan->VFxUF;
if (BackedgeTakenCount) {
- NewPlan->BackedgeTakenCount = new VPValue();
+ NewPlan->BackedgeTakenCount = new VPSymbolicValue();
Old2NewVPValues[BackedgeTakenCount] = NewPlan->BackedgeTakenCount;
}
- if (TripCount && TripCount->isLiveIn())
- Old2NewVPValues[TripCount] =
- NewPlan->getOrAddLiveIn(TripCount->getLiveInIRValue());
+ if (auto *LI = dyn_cast_or_null<VPIRValue>(TripCount))
----------------
fhahn wrote:
updated thanks
https://github.com/llvm/llvm-project/pull/172758
More information about the llvm-commits
mailing list