[llvm] [VPlan] Track VPValues instead of VPRecipes in calculateRegisterUsage. (PR #155301)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 08:54:59 PDT 2025
================
@@ -593,8 +593,10 @@ SmallVector<VPRegisterUsage, 8> llvm::calculateRegisterUsageForPlan(
LLVM_DEBUG(dbgs() << "LV(REG): At #" << Idx << " Interval # "
<< OpenIntervals.size() << '\n');
- // Add the current recipe to the list of open intervals.
- OpenIntervals.insert(R);
+ // Add the VPValues defined by the current recipe to the list of open
+ // intervals.
+ for (VPValue *DefV : R->definedValues())
+ OpenIntervals.insert(DefV);
----------------
fhahn wrote:
Added a check if DefV is in `Ends`, although it should mostly only happen with interleave groups with unused members I think; and those parts should probably be removed, but I'll check if I can find a case where it makes a difference.
https://github.com/llvm/llvm-project/pull/155301
More information about the llvm-commits
mailing list