[PATCH] D143388: [Lint] Use new PM instead of legacy PM in lintFunction and lintModule

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 09:42:41 PST 2023


aeubanks accepted this revision.
aeubanks added a comment.
This revision is now accepted and ready to land.

can we delete the legacy pass?



================
Comment at: llvm/lib/Analysis/Lint.cpp:774
 
-  legacy::FunctionPassManager FPM(F.getParent());
-  auto *V = new LintLegacyPass();
-  FPM.add(V);
-  FPM.run(F);
+  PassBuilder PB;
+  LoopAnalysisManager LAM;
----------------
bjope wrote:
> I think this is how one is supposed to do it. But it gets a bit cluttery to setup all these managers everywhere.
> 
> Do you think it would be better to have some helper to setup a PassBuilder with default managers/analyses/proxies?   (I don't think there exist such a helper today, but as some future improvement)
yes, I was thinking about how to do that at some point then got distracted

probably something the lines of moving the analysis managers into the PassBuilder


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143388/new/

https://reviews.llvm.org/D143388



More information about the llvm-commits mailing list