[PATCH] D112477: [docs][NewPM] Add example C++ code on how to actually use the new PM

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 12:31:06 PDT 2021


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

Thank you, this is very helpful!

Feedback for future extensions: how to add sanitizers to the default pipeline.



================
Comment at: llvm/docs/NewPassManager.rst:44
+  // This one corresponds to a typical -O3 optimization pipeline.
+  ModulePassManager MPM = PB.buildPerModuleDefaultPipeline(OptimizationLevel::O2);
+
----------------
Sync so both comment and optimization level are either `O3` or `O2`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112477



More information about the llvm-commits mailing list