[llvm] [VPlan] Refactor VPlan creation, add transform introducing region (NFC). (PR #128419)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 14:36:25 PST 2025


================
@@ -3589,6 +3574,8 @@ class VPlan {
     TripCount = NewTripCount;
   }
 
+  void setTripCount(VPValue *NewTripCount) { TripCount = NewTripCount; }
----------------
ayalz wrote:

Better place setTripCount() before resetTripCount().
```suggestion
  // Set the trip count assuming it is currently null; if it is not - use resetTripCount().
  void setTripCount(VPValue *NewTripCount) {
    assert(!TripCount && "TripCount expected to be null");
    TripCount = NewTripCount;
  }
```

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


More information about the llvm-commits mailing list