[PATCH] D84259: [NFC][NewPM] Add clarification on analysis manager proxies

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 08:41:46 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4e171c9f19d4: [NFC][NewPM] Add clarification on analysis manager proxies (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84259

Files:
  llvm/include/llvm/IR/PassManager.h


Index: llvm/include/llvm/IR/PassManager.h
===================================================================
--- llvm/include/llvm/IR/PassManager.h
+++ llvm/include/llvm/IR/PassManager.h
@@ -1061,7 +1061,16 @@
 ///
 /// This proxy only exposes the const interface of the outer analysis manager,
 /// to indicate that you cannot cause an outer analysis to run from within an
-/// inner pass.  Instead, you must rely on the \c getCachedResult API.
+/// inner pass.  Instead, you must rely on the \c getCachedResult API.  This is
+/// due to keeping potential future concurrency in mind. To give an example,
+/// running a module analysis before any function passes may give a different
+/// result than running it in a function pass. Both may be valid, but it would
+/// produce non-deterministic results. GlobalsAA is a good analysis example,
+/// because the cached information has the mod/ref info for all memory for each
+/// function at the time the analysis was computed. The information is still
+/// valid after a function transformation, but it may be *different* if
+/// recomputed after that transform. GlobalsAA is never invalidated.
+
 ///
 /// This proxy doesn't manage invalidation in any way -- that is handled by the
 /// recursive return path of each layer of the pass manager.  A consequence of


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84259.279836.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200722/e9054382/attachment.bin>


More information about the llvm-commits mailing list