[llvm] [SandboxVectorizer] Use sbvec-passes flag to create a pipeline of Region passes after BottomUpVec. (PR #111223)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 12:33:36 PDT 2024
================
@@ -56,31 +108,13 @@ bool SandboxVectorizerPass::runImpl(Function &LLVMF) {
return false;
}
- sandboxir::Context Ctx(LLVMF.getContext());
- // Create SandboxIR for `LLVMF`.
- sandboxir::Function &F = *Ctx.createFunction(&LLVMF);
- // Create the passes and register them with the PassRegistry.
- sandboxir::PassRegistry PR;
- auto &BottomUpVecPass = static_cast<sandboxir::FunctionPass &>(
- PR.registerPass(std::make_unique<sandboxir::BottomUpVec>()));
-
- sandboxir::FunctionPassManager *PM = nullptr;
- if (UserDefinedPassPipeline == DefaultPipelineMagicStr) {
- // Create the default pass pipeline.
- PM = &static_cast<sandboxir::FunctionPassManager &>(PR.registerPass(
- std::make_unique<sandboxir::FunctionPassManager>("pm")));
- PM->addPass(&BottomUpVecPass);
- } else {
- // Create the user-defined pipeline.
- PM = &PR.parseAndCreatePassPipeline(UserDefinedPassPipeline);
- }
-
if (PrintPassPipeline) {
----------------
aeubanks wrote:
yeah, all the non-owning pointers make me sus
https://github.com/llvm/llvm-project/pull/111223
More information about the llvm-commits
mailing list