[PATCH] D145325: [docs][NewPM] fix typos in new pass manager docs
Alex MacLean via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 5 12:02:13 PST 2023
AlexM created this revision.
AlexM added a reviewer: aeubanks.
Herald added a subscriber: awarzynski.
Herald added a project: All.
AlexM edited the summary of this revision.
AlexM added reviewers: asbirlea, nikic.
Herald added a subscriber: StephenFan.
AlexM published this revision for review.
AlexM added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
I spotted these errors while working through the docs. This is my first LLVM code review so apologies for any errors I've made in following the process. Thanks!
Fix some minor errors in the code-block sections of the new pass manager documentation
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145325
Files:
llvm/docs/NewPassManager.rst
Index: llvm/docs/NewPassManager.rst
===================================================================
--- llvm/docs/NewPassManager.rst
+++ llvm/docs/NewPassManager.rst
@@ -92,9 +92,9 @@
MPM.addPass(createModuleToFunctionPassAdaptor(FunctionFooPass()));
// loop -> function -> cgscc -> module
- MPM.addPass(createModuleToCGSCCPassAdaptor(createCGSCCToFunctionPassAdaptor(createFunctionToLoopPassAdaptor(LoopFooPass()))));
+ MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(createCGSCCToFunctionPassAdaptor(createFunctionToLoopPassAdaptor(LoopFooPass()))));
// function -> cgscc -> module
- MPM.addPass(createModuleToCGSCCPassAdaptor(createCGSCCToFunctionPassAdaptor(FunctionFooPass())));
+ MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(createCGSCCToFunctionPassAdaptor(FunctionFooPass())));
A pass manager of a specific IR unit is also a pass of that kind. For
@@ -386,7 +386,7 @@
.. code-block:: c++
bool FooAnalysisResult::invalidate(Function &F, const PreservedAnalyses &PA,
- FunctionAnalysisManager::Invalidator &) {
+ FunctionAnalysisManager::Invalidator &Inv) {
auto PAC = PA.getChecker<FooAnalysis>();
if (!PAC.preserved() && !PAC.preservedSet<AllAnalysesOn<Function>>())
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145325.502452.patch
Type: text/x-patch
Size: 1318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230305/8197baec/attachment.bin>
More information about the llvm-commits
mailing list