[llvm] a348341 - [VPlan] Inline addVPValue into single caller (NFCI).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 03:15:03 PDT 2024


Author: Florian Hahn
Date: 2024-04-01T11:12:35+01:00
New Revision: a34834138a53f7eb28ba24d325b258ac6f51ae8c

URL: https://github.com/llvm/llvm-project/commit/a34834138a53f7eb28ba24d325b258ac6f51ae8c
DIFF: https://github.com/llvm/llvm-project/commit/a34834138a53f7eb28ba24d325b258ac6f51ae8c.diff

LOG: [VPlan] Inline addVPValue into single caller (NFCI).

Inline the function into its single caller.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlan.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 6c90c793e66cae..fdb5c125434ade 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3006,13 +3006,6 @@ class VPlan {
 
   void setName(const Twine &newName) { Name = newName.str(); }
 
-  void addVPValue(Value *V, VPValue *VPV) {
-    assert(VPV->isLiveIn() && "VPV must be a live-in.");
-    assert(V && "Trying to add a null Value to VPlan");
-    assert(!Value2VPValue.count(V) && "Value already exists in VPlan");
-    Value2VPValue[V] = VPV;
-  }
-
   /// Gets the live-in VPValue for \p V or adds a new live-in (if none exists
   ///  yet) for \p V.
   VPValue *getOrAddLiveIn(Value *V) {
@@ -3020,7 +3013,9 @@ class VPlan {
     if (!Value2VPValue.count(V)) {
       VPValue *VPV = new VPValue(V);
       VPLiveInsToFree.push_back(VPV);
-      addVPValue(V, VPV);
+      assert(VPV->isLiveIn() && "VPV must be a live-in.");
+      assert(!Value2VPValue.count(V) && "Value already exists in VPlan");
+      Value2VPValue[V] = VPV;
     }
 
     assert(Value2VPValue.count(V) && "Value does not exist in VPlan");


        


More information about the llvm-commits mailing list