Jlm
Public Types | Public Member Functions | List of all members
jlm::llvm::aa::AliasAnalysis Class Referenceabstract

#include <AliasAnalysis.hpp>

Inheritance diagram for jlm::llvm::aa::AliasAnalysis:
Inheritance graph
[legend]

Public Types

enum  AliasQueryResponse { NoAlias , MayAlias , MustAlias }
 

Public Member Functions

 AliasAnalysis ()
 
virtual ~AliasAnalysis () noexcept
 
virtual std::string ToString () const =0
 
virtual AliasQueryResponse Query (const rvsdg::Output &p1, size_t s1, const rvsdg::Output &p2, size_t s2)=0
 

Detailed Description

Interface for making alias analysis queries about pairs of pointers p1 and p2. Each pointer must also have an associated compile time byte size, s1 and s2. The analysis response gives guarantees about the possibility of [p1, p1+s1) and [p2, p2+s2) overlapping.

If p1 and p2 are both defined within a lambda region, it must be the same lambda region. When both pointers are defined within a region, the alias query is made relative to an execution of that region. Thus, a NoAlias response does not make any guarantees about aliasing between different executions of the region.

Definition at line 25 of file AliasAnalysis.hpp.

Member Enumeration Documentation

◆ AliasQueryResponse

The possible responses of an alias query about two memory regions (p1, s1) and (p2, s2)

Enumerator
NoAlias 
MayAlias 
MustAlias 

Definition at line 31 of file AliasAnalysis.hpp.

Constructor & Destructor Documentation

◆ AliasAnalysis()

jlm::llvm::aa::AliasAnalysis::AliasAnalysis ( )
default

◆ ~AliasAnalysis()

jlm::llvm::aa::AliasAnalysis::~AliasAnalysis ( )
virtualdefaultnoexcept

Member Function Documentation

◆ Query()

virtual AliasQueryResponse jlm::llvm::aa::AliasAnalysis::Query ( const rvsdg::Output p1,
size_t  s1,
const rvsdg::Output p2,
size_t  s2 
)
pure virtual

Queries the alias analysis about two memory regions represented as pointer + size pairs.

Parameters
p1the first pointer value
s1the byte size of the first pointer access
p2the second pointer value
s2the byte size of the second pointer access
Returns
the result of the alias query

Implemented in jlm::llvm::aa::PointsToGraphAliasAnalysis, jlm::llvm::aa::LocalAliasAnalysis, and jlm::llvm::aa::ChainedAliasAnalysis.

◆ ToString()

virtual std::string jlm::llvm::aa::AliasAnalysis::ToString ( ) const
pure virtual
Returns
a string description of the alias analysis

Implemented in jlm::llvm::aa::PointsToGraphAliasAnalysis, jlm::llvm::aa::LocalAliasAnalysis, and jlm::llvm::aa::ChainedAliasAnalysis.


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