[llvm] [SandboxVectorizer] Use sbvec-passes flag to create a pipeline of Region passes after BottomUpVec. (PR #111223)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 08:32:44 PDT 2024


================
@@ -17,10 +21,22 @@ class TargetTransformInfo;
 class SandboxVectorizerPass : public PassInfoMixin<SandboxVectorizerPass> {
   TargetTransformInfo *TTI = nullptr;
 
-public:
-  PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
+  // Used to build a RegionPass pipeline to be run on Regions created by the
+  // bottom-up vectorization pass.
+  sandboxir::PassRegistry PR;
+
+  // The main vectorizer pass.
+  std::unique_ptr<sandboxir::BottomUpVec> BottomUpVecPass;
----------------
vporpo wrote:

Why is this a member variable? It's created and used only within `runOnFunction()` at the moment, so making it a class member implies that it used across multiple member functions of `SandboxVectorizerPass`. Are you planning to move it to a separate class that `SandboxVectorizerPass` inherits from?

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


More information about the llvm-commits mailing list