[docs] Fix some wording

This commit is contained in:
Arthur Eubanks 2021-05-04 10:21:38 -07:00
parent e1c729c568
commit 0172b1389e

View File

@ -147,13 +147,13 @@ LLVM provides many analyses that passes can use, such as a dominator tree.
Calculating these can be expensive, so the new pass manager has Calculating these can be expensive, so the new pass manager has
infrastructure to cache analyses and reuse them when possible. infrastructure to cache analyses and reuse them when possible.
When a pass runs on some IR, it also receives an analysis manager which it When a pass runs on some IR, it also receives an analysis manager which it can
can query for analyses. Querying for an analysis will cause the manager to query for analyses. Querying for an analysis will cause the manager to check if
check if it has already computed the result for the requested IR. If it does it has already computed the result for the requested IR. If it already has and
and the result is still valid, it will return that. Otherwise it will the result is still valid, it will return that. Otherwise it will construct a
construct a new result by calling the analysis's ``run()`` method, cache it, new result by calling the analysis's ``run()`` method, cache it, and return it.
and return it. You can also ask the analysis manager to only return an You can also ask the analysis manager to only return an analysis if it's
analysis if it's already cached. already cached.
The analysis manager only provides analysis results for the same IR type as The analysis manager only provides analysis results for the same IR type as
what the pass runs on. For example, a function pass receives an analysis what the pass runs on. For example, a function pass receives an analysis