[llvm] [LV][NFC] Print VPlan's transformation pipline (PR #72665)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 15:35:07 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff eae1811e4f0431ea6336e68a38318a55f7529ef6 9416e841e7dcc6eec5930d77653537c2568a2444 -- llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index c97d4bcca0..4bb0e88e57 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -24,7 +24,6 @@
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/IR/PatternMatch.h"
 
-
 using namespace llvm;
 
 static cl::list<std::string>
@@ -37,12 +36,14 @@ static cl::list<std::string>
                llvm::cl::desc("Print VPlan after specified VPlan passes"),
                cl::CommaSeparated, cl::Hidden);
 
-static cl::opt<bool> PrintBeforeAll("vplan-print-before-all",
-                                    llvm::cl::desc("Print VPlan before each VPlan pass"),
-                                    cl::init(false), cl::Hidden);
-static cl::opt<bool> PrintAfterAll("vplan-print-after-all",
-                                   llvm::cl::desc("Print VPlan after each VPlanpass"),
-                                   cl::init(false), cl::Hidden);
+static cl::opt<bool>
+    PrintBeforeAll("vplan-print-before-all",
+                   llvm::cl::desc("Print VPlan before each VPlan pass"),
+                   cl::init(false), cl::Hidden);
+static cl::opt<bool>
+    PrintAfterAll("vplan-print-after-all",
+                  llvm::cl::desc("Print VPlan after each VPlanpass"),
+                  cl::init(false), cl::Hidden);
 
 using namespace llvm::PatternMatch;
 
@@ -483,7 +484,8 @@ struct RemoveRedundantInductionCastsPass
 
 /// Try to replace VPWidenCanonicalIVRecipes with a widened canonical IV
 /// recipe, if it exists.
-struct RemoveRedundantCanonicalIVsPass : public VPlanPass<RemoveRedundantCanonicalIVsPass> {
+struct RemoveRedundantCanonicalIVsPass
+    : public VPlanPass<RemoveRedundantCanonicalIVsPass> {
   virtual StringRef getPassArgument() const override {
     return "remove-redundant-canonical-ivs";
   }
@@ -559,10 +561,10 @@ struct RemoveDeadRecipes : public VPlanPass<RemoveDeadRecipes> {
   }
 };
 
-static VPValue *
-createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID,
-                    ScalarEvolution &SE, Instruction *TruncI, Type *IVTy,
-                    VPValue *StartV, VPValue *Step) {
+static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID,
+                                    ScalarEvolution &SE, Instruction *TruncI,
+                                    Type *IVTy, VPValue *StartV,
+                                    VPValue *Step) {
   VPBasicBlock *HeaderVPBB = Plan.getVectorLoopRegion()->getEntryBasicBlock();
   auto IP = HeaderVPBB->getFirstNonPhi();
   VPCanonicalIVPHIRecipe *CanonicalIV = Plan.getCanonicalIV();
@@ -590,7 +592,9 @@ private:
 public:
   explicit OptimizeInductionsPass(ScalarEvolution &SE) : SE(SE) {}
 
-  virtual StringRef getPassArgument() const override { return "optimize-inductions"; }
+  virtual StringRef getPassArgument() const override {
+    return "optimize-inductions";
+  }
 
   virtual void run(VPlan &Plan) override {
     SmallVector<VPRecipeBase *> ToRemove;
@@ -956,7 +960,9 @@ private:
   LLVMContext &Ctx;
 
 public:
-  virtual StringRef getPassArgument() const override { return "simplify-recipes"; }
+  virtual StringRef getPassArgument() const override {
+    return "simplify-recipes";
+  }
   explicit SimplifyRecipesPass(LLVMContext &Ctx) : Ctx(Ctx) {}
 
   virtual void run(VPlan &Plan) override {

``````````

</details>


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


More information about the llvm-commits mailing list