[PATCH] D59315: [AliasAnalysis] Second prototype to cache BasicAA / anyAA state.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 15:18:56 PDT 2019
chandlerc added a comment.
Just documentation tweaks....
================
Comment at: include/llvm/Analysis/AliasAnalysis.h:289-290
+/// This class stores the info we want to pass to any alias query. By default,
+/// AliasAnalysis is stateless, i.e., every alias()/getModRefInfo call uses a
+/// new AAQueryInfo object. AAQueryInfo currently holds the BasicAA caches. To
----------------
I might suggest a slight rewording here to avoid confusion -- the analyses themselves may still be stateful. It's that the *queries* are stateless.
Maybe:
```
This class stores info we want to provide to or retain within an alias query.
By default, the root query is stateless and starts with a freshly constructed
info object. Specific alias analyses can use this query info to store
per-query state that is important for recursive or nested queries to avoid
recomputing. To enable preserving this state across multiple queries where
safe (due to the IR not changing), use a `BatchAAResults` wrapper.
```
Then I would move the more detailed discussion of how `BatchAAResults` works to that class's comments.
================
Comment at: include/llvm/Analysis/AliasAnalysis.h:772
+
+class BatchAAResults {
+ AAResults &AA;
----------------
See above, but generally need comments here too. Especially important to describe the invariants under which this is safe to use.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59315/new/
https://reviews.llvm.org/D59315
More information about the llvm-commits
mailing list