[llvm] 6b8a142 - [docs][NewPM] Add comment about declaring analysis managers in the correct order

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 10:22:24 PDT 2023


Author: Arthur Eubanks
Date: 2023-10-19T10:22:08-07:00
New Revision: 6b8a1425eafce38f2c2ba2269c473a12cb825cb2

URL: https://github.com/llvm/llvm-project/commit/6b8a1425eafce38f2c2ba2269c473a12cb825cb2
DIFF: https://github.com/llvm/llvm-project/commit/6b8a1425eafce38f2c2ba2269c473a12cb825cb2.diff

LOG: [docs][NewPM] Add comment about declaring analysis managers in the correct order

Otherwise you will likely get crashes.

Added: 
    

Modified: 
    llvm/docs/NewPassManager.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/NewPassManager.rst b/llvm/docs/NewPassManager.rst
index 7464110daa092ff..4554d800437548b 100644
--- a/llvm/docs/NewPassManager.rst
+++ b/llvm/docs/NewPassManager.rst
@@ -17,6 +17,8 @@ Just Tell Me How To Run The Default Optimization Pipeline With The New Pass Mana
 .. code-block:: c++
 
   // Create the analysis managers.
+  // These must be declared in this order so that they are destroyed in the
+  // correct order due to inter-analysis-manager references.
   LoopAnalysisManager LAM;
   FunctionAnalysisManager FAM;
   CGSCCAnalysisManager CGAM;


        


More information about the llvm-commits mailing list