Lines Matching refs:analysis

19   // Create the analysis managers.
189 When a pass runs on some IR, it also receives an analysis manager which it can
190 query for analyses. Querying for an analysis will cause the manager to check if
193 new result by calling the analysis's ``run()`` method, cache it, and return it.
194 You can also ask the analysis manager to only return an analysis if it's
197 The analysis manager only provides analysis results for the same IR type as
198 what the pass runs on. For example, a function pass receives an analysis
203 immutable global analysis. In these cases, the analysis manager can provide a
204 proxy to an outer or inner level analysis manager. For example, to get a
214 would have access to. To get access to an outer level IR analysis, you can
223 Asking for a cached and immutable outer level IR analysis works via
224 ``getCachedResult()``, but getting direct access to an outer level IR analysis
225 manager to compute an outer level IR analysis is not allowed. This is for a
230 analysis often scans every function and allowing function passes to run a module
231 analysis may cause us to scan functions a quadratic number of times. If passes
243 module. Since passes can ask for a cached analysis result, allowing passes to
244 trigger outer level analysis computation could result in non-determinism if
265 As with any caching mechanism, we need some way to tell analysis managers
266 when results are no longer valid. Much of the analysis manager complexity
267 comes from trying to invalidate as few analysis results as possible to keep
270 There are two ways to deal with potentially invalid analysis results. One is
275 The typical way to invalidate analysis results is for a pass to declare what
278 transformation, or tell the analysis manager that analyses are no longer
280 analysis up to date, such as when updating it would be faster than
281 invalidating and recalculating it, the analysis itself may have methods to
283 ``DomTreeUpdater`` for a ``DominatorTree``. Otherwise to mark some analysis
295 …lly updated the dominator tree alongside any transformations, but other analysis results may be in…
305 The pass manager will call the analysis manager's ``invalidate()`` method
314 // Invalidate all analysis results for function F1.
317 // Invalidate all analysis results across the entire module.
320 …// Clear the entry in the analysis manager for function F2 if we've completely removed it from the…
332 analysis manager proxy which will clear all cached analyses, conservatively
335 cached/invalidated, you can mark the analysis manager proxy as preserved,
343 By default, an analysis is invalidated if ``PreservedAnalyses`` says that
345 ``AnalysisResultModel::invalidate()``). An analysis can implement
366 If an analysis is stateless and generally shouldn't be invalidated, use the
373 // Check whether the analysis has been explicitly invalidated. Otherwise, it's
379 If an analysis depends on other analyses, those analyses also need to be
395 Combining invalidation and analysis manager proxies results in some
401 needs to completely clear all relevant analysis results. Otherwise the proxy
402 simply forwards the invalidation to the inner analysis manager.
404 Generally for outer proxies, analysis results from the outer analysis manager
406 possible for some inner analysis to depend on some outer analysis, and when
407 the outer analysis is invalidated, we need to make sure that dependent inner
408 analyses are also invalidated. This actually happens with alias analysis
409 results. Alias analysis is a function-level analysis, but there are
410 module-level implementations of specific types of alias analysis. Currently
411 ``GlobalsAA`` is the only module-level alias analysis and it generally is not
489 To make sure an analysis named ``foo`` is available before a pass, add
491 that the analysis is run. This pass is also subject to proper nesting. For
492 example, to make sure some function analysis is already computed for all
497 $ opt -passes='function(require<my-function-analysis>),my-module-pass' /tmp/a.ll -S