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

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 04:53:54 PST 2023


bjope added inline comments.


================
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;
----------------
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)


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