LLVM  14.0.0git
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
llvm::AAQueryInfo Class Reference

This class stores info we want to provide to or retain within an alias query. More...

#include "llvm/Analysis/AliasAnalysis.h"

Inheritance diagram for llvm::AAQueryInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::AAQueryInfo:
Collaboration graph
[legend]

Classes

struct  CacheEntry
 

Public Types

using LocPair = std::pair< AACacheLoc, AACacheLoc >
 
using AliasCacheT = SmallDenseMap< LocPair, CacheEntry, 8 >
 

Public Member Functions

 AAQueryInfo (CaptureInfo *CI)
 
AAQueryInfo withEmptyCache ()
 Create a new AAQueryInfo based on this one, but with the cache cleared. More...
 

Public Attributes

AliasCacheT AliasCache
 
CaptureInfoCI
 
unsigned Depth = 0
 Query depth used to distinguish recursive queries. More...
 
int NumAssumptionUses = 0
 How many active NoAlias assumption uses there are. More...
 
SmallVector< AAQueryInfo::LocPair, 4 > AssumptionBasedResults
 Location pairs for which an assumption based result is currently stored. More...
 

Detailed Description

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. The information stored in an AAQueryInfo is currently limitted to the caches used by BasicAA, but can further be extended to fit other AA needs.

Definition at line 459 of file AliasAnalysis.h.

Member Typedef Documentation

◆ AliasCacheT

Definition at line 470 of file AliasAnalysis.h.

◆ LocPair

Definition at line 461 of file AliasAnalysis.h.

Constructor & Destructor Documentation

◆ AAQueryInfo()

llvm::AAQueryInfo::AAQueryInfo ( CaptureInfo CI)
inline

Definition at line 486 of file AliasAnalysis.h.

Member Function Documentation

◆ withEmptyCache()

AAQueryInfo llvm::AAQueryInfo::withEmptyCache ( )
inline

Create a new AAQueryInfo based on this one, but with the cache cleared.

This is used for recursive queries across phis, where cache results may not be valid.

Definition at line 491 of file AliasAnalysis.h.

References CI, and Depth.

Member Data Documentation

◆ AliasCache

AliasCacheT llvm::AAQueryInfo::AliasCache

Definition at line 471 of file AliasAnalysis.h.

◆ AssumptionBasedResults

SmallVector<AAQueryInfo::LocPair, 4> llvm::AAQueryInfo::AssumptionBasedResults

Location pairs for which an assumption based result is currently stored.

Used to remove all potentially incorrect results from the cache if an assumption is disproven.

Definition at line 484 of file AliasAnalysis.h.

◆ CI

CaptureInfo* llvm::AAQueryInfo::CI

Definition at line 473 of file AliasAnalysis.h.

Referenced by llvm::BasicAAResult::getModRefInfo(), and withEmptyCache().

◆ Depth

unsigned llvm::AAQueryInfo::Depth = 0

Query depth used to distinguish recursive queries.

Definition at line 476 of file AliasAnalysis.h.

Referenced by withEmptyCache().

◆ NumAssumptionUses

int llvm::AAQueryInfo::NumAssumptionUses = 0

How many active NoAlias assumption uses there are.

Definition at line 479 of file AliasAnalysis.h.


The documentation for this class was generated from the following file: