[llvm-branch-commits] [llvm] f73c09c - [VPlan] Use public VPValue constructor in VPPRedInstPHIRecipe (NFC).

Florian Hahn via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 6 02:54:36 PST 2021


Author: Florian Hahn
Date: 2021-01-06T10:47:09Z
New Revision: f73c09caa2a86fa9fe6f88b4a4c438c005fea32c

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

LOG: [VPlan] Use public VPValue constructor in VPPRedInstPHIRecipe (NFC).

VPPredInstPHIRecipe does not need access to VPValue via friendship. It
can just use the public constructor,

Discussed as part of D92281.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index e6635e788e18..01c2894f6b80 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1242,7 +1242,7 @@ class VPPredInstPHIRecipe : public VPRecipeBase, public VPUser {
   /// nodes after merging back from a Branch-on-Mask.
   VPPredInstPHIRecipe(VPValue *PredV)
       : VPRecipeBase(VPPredInstPHISC), VPUser(PredV) {
-    new VPValue(VPValue::VPValueSC, PredV->getUnderlyingValue(), this);
+    new VPValue(PredV->getUnderlyingValue(), this);
   }
   ~VPPredInstPHIRecipe() override = default;
 

diff  --git a/llvm/lib/Transforms/Vectorize/VPlanValue.h b/llvm/lib/Transforms/Vectorize/VPlanValue.h
index 1ebe1f8204a5..5bafe220785d 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanValue.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanValue.h
@@ -35,7 +35,6 @@ class VPDef;
 class VPSlotTracker;
 class VPUser;
 class VPRecipeBase;
-class VPPredInstPHIRecipe;
 class VPWidenMemoryInstructionRecipe;
 
 // This is the base class of the VPlan Def/Use graph, used for modeling the data
@@ -51,7 +50,6 @@ class VPValue {
   friend class VPInterleavedAccessInfo;
   friend class VPSlotTracker;
   friend class VPRecipeBase;
-  friend class VPPredInstPHIRecipe;
   friend class VPWidenMemoryInstructionRecipe;
 
   const unsigned char SubclassID; ///< Subclass identifier (for isa/dyn_cast).


        


More information about the llvm-branch-commits mailing list