[llvm] 719846c - [VPlan] Drop redundant private: at beginning of class defs (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 11 05:27:31 PDT 2020


Author: Florian Hahn
Date: 2020-04-11T13:27:10+01:00
New Revision: 719846c469ed37e1de4d2f8d2ea857de672fe66e

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

LOG: [VPlan] Drop redundant private: at beginning of class defs (NFC).

Default visibility for classes is private, so the private: at the top of
various class definitions is redundant.

Reviewers: gilr, rengolin, Ayal, hsaito

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D77810

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
index e5edd305d3d5..c8fe5a6d4738 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
@@ -33,7 +33,6 @@ namespace llvm {
 
 /// VPlan-based builder utility analogous to IRBuilder.
 class VPBuilder {
-private:
   VPBasicBlock *BB = nullptr;
   VPBasicBlock::iterator InsertPt = VPBasicBlock::iterator();
 

diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index d331992e534c..030ba9812d14 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -346,7 +346,6 @@ struct VPTransformState {
 class VPBlockBase {
   friend class VPBlockUtils;
 
-private:
   const unsigned char SubclassID; ///< Subclass identifier (for isa/dyn_cast).
 
   /// An optional name for the block.
@@ -594,7 +593,6 @@ class VPRecipeBase : public ilist_node_with_parent<VPRecipeBase, VPBasicBlock> {
   friend VPBasicBlock;
   friend class VPBlockUtils;
 
-private:
   const unsigned char SubclassID; ///< Subclass identifier (for isa/dyn_cast).
 
   /// Each VPRecipe belongs to a single VPBasicBlock.
@@ -766,7 +764,6 @@ class VPInstruction : public VPUser, public VPRecipeBase {
 /// ingredient. This recipe covers most of the traditional vectorization cases
 /// where each ingredient transforms into a vectorized version of itself.
 class VPWidenRecipe : public VPRecipeBase {
-private:
   /// Hold the instruction to be widened.
   Instruction &Ingredient;
 
@@ -790,7 +787,6 @@ class VPWidenRecipe : public VPRecipeBase {
 
 /// A recipe for widening Call instructions.
 class VPWidenCallRecipe : public VPRecipeBase {
-private:
   /// Hold the call to be widened.
   CallInst &Ingredient;
 
@@ -819,7 +815,6 @@ class VPWidenCallRecipe : public VPRecipeBase {
 
 /// A recipe for handling GEP instructions.
 class VPWidenGEPRecipe : public VPRecipeBase {
-private:
   GetElementPtrInst *GEP;
   bool IsPtrLoopInvariant;
   SmallBitVector IsIndexLoopInvariant;
@@ -851,7 +846,6 @@ class VPWidenGEPRecipe : public VPRecipeBase {
 /// A recipe for handling phi nodes of integer and floating-point inductions,
 /// producing their vector and scalar values.
 class VPWidenIntOrFpInductionRecipe : public VPRecipeBase {
-private:
   PHINode *IV;
   TruncInst *Trunc;
 
@@ -876,7 +870,6 @@ class VPWidenIntOrFpInductionRecipe : public VPRecipeBase {
 
 /// A recipe for handling all phi nodes except for integer and FP inductions.
 class VPWidenPHIRecipe : public VPRecipeBase {
-private:
   PHINode *Phi;
 
 public:
@@ -899,7 +892,6 @@ class VPWidenPHIRecipe : public VPRecipeBase {
 /// A recipe for vectorizing a phi-node as a sequence of mask-based select
 /// instructions.
 class VPBlendRecipe : public VPRecipeBase {
-private:
   PHINode *Phi;
 
   /// The blend operation is a User of the incoming values and of their
@@ -946,7 +938,6 @@ class VPBlendRecipe : public VPRecipeBase {
 /// VPInterleaveRecipe is a recipe for transforming an interleave group of load
 /// or stores into one wide load/store and shuffles.
 class VPInterleaveRecipe : public VPRecipeBase {
-private:
   const InterleaveGroup<Instruction> *IG;
   VPUser User;
 
@@ -991,7 +982,6 @@ class VPInterleaveRecipe : public VPRecipeBase {
 /// single copy of widened type for all lanes. If the instruction is known to be
 /// uniform only one copy, per lane zero, will be generated.
 class VPReplicateRecipe : public VPRecipeBase {
-private:
   /// The instruction being replicated.
   Instruction *Ingredient;
 
@@ -1037,7 +1027,6 @@ class VPReplicateRecipe : public VPRecipeBase {
 
 /// A recipe for generating conditional branches on the bits of a mask.
 class VPBranchOnMaskRecipe : public VPRecipeBase {
-private:
   std::unique_ptr<VPUser> User;
 
 public:
@@ -1073,7 +1062,6 @@ class VPBranchOnMaskRecipe : public VPRecipeBase {
 /// The phi nodes can be scalar or vector depending on the users of the value.
 /// This recipe works in concert with VPBranchOnMaskRecipe.
 class VPPredInstPHIRecipe : public VPRecipeBase {
-private:
   Instruction *PredInst;
 
 public:
@@ -1103,7 +1091,6 @@ class VPPredInstPHIRecipe : public VPRecipeBase {
 /// TODO: We currently execute only per-part unless a specific instance is
 /// provided.
 class VPWidenMemoryInstructionRecipe : public VPRecipeBase {
-private:
   Instruction &Instr;
   VPUser User;
 
@@ -1165,7 +1152,6 @@ class VPWidenMemoryInstructionRecipe : public VPRecipeBase {
 
 /// A Recipe for widening the canonical induction variable of the vector loop.
 class VPWidenCanonicalIVRecipe : public VPRecipeBase {
-private:
   /// A VPValue representing the canonical vector IV.
   VPValue Val;
 
@@ -1282,7 +1268,6 @@ class VPBasicBlock : public VPBlockBase {
 /// candidate VF's. The actual replication takes place only once the desired VF
 /// and UF have been determined.
 class VPRegionBlock : public VPBlockBase {
-private:
   /// Hold the Single Entry of the SESE region modelled by the VPRegionBlock.
   VPBlockBase *Entry;
 
@@ -1488,7 +1473,6 @@ class VPlan {
   friend class VPlanPrinter;
   friend class VPSlotTracker;
 
-private:
   /// Hold the single entry to the Hierarchical CFG of the VPlan.
   VPBlockBase *Entry;
 
@@ -1785,7 +1769,6 @@ class VPBlockUtils {
 };
 
 class VPInterleavedAccessInfo {
-private:
   DenseMap<VPInstruction *, InterleaveGroup<VPInstruction> *>
       InterleaveGroupMap;
 
@@ -1829,7 +1812,6 @@ class VPInterleavedAccessInfo {
 /// Class that maps (parts of) an existing VPlan to trees of combined
 /// VPInstructions.
 class VPlanSlp {
-private:
   enum class OpMode { Failed, Load, Opcode };
 
   /// A DenseMapInfo implementation for using SmallVector<VPValue *, 4> as

diff  --git a/llvm/lib/Transforms/Vectorize/VPlanValue.h b/llvm/lib/Transforms/Vectorize/VPlanValue.h
index 7afbb97ca548..465c47d225c8 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanValue.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanValue.h
@@ -45,7 +45,6 @@ class VPValue {
   friend class VPInterleavedAccessInfo;
   friend class VPSlotTracker;
 
-private:
   const unsigned char SubclassID; ///< Subclass identifier (for isa/dyn_cast).
 
   SmallVector<VPUser *, 1> Users;
@@ -133,7 +132,6 @@ raw_ostream &operator<<(raw_ostream &OS, const VPValue &V);
 /// This class augments VPValue with operands which provide the inverse def-use
 /// edges from VPValue's users to their defs.
 class VPUser : public VPValue {
-private:
   SmallVector<VPValue *, 2> Operands;
 
 protected:
@@ -198,7 +196,6 @@ class VPRegionBlock;
 /// VPlan and allows querying the numbering for printing, similar to the
 /// ModuleSlotTracker for IR values.
 class VPSlotTracker {
-private:
   DenseMap<const VPValue *, unsigned> Slots;
   unsigned NextSlot = 0;
 


        


More information about the llvm-commits mailing list