MLIR  20.0.0git
Public Member Functions | List of all members
mlir::AliasAnalysis Class Reference

This class represents the main alias analysis interface in MLIR. More...

#include "mlir/Analysis/AliasAnalysis.h"

Public Member Functions

 AliasAnalysis (Operation *op)
 
template<typename AnalysisT >
void addAnalysisImplementation (AnalysisT &&analysis)
 Add a new alias analysis implementation AnalysisT to this analysis aggregate. More...
 
AliasResult alias (Value lhs, Value rhs)
 Given two values, return their aliasing behavior. More...
 
ModRefResult getModRef (Operation *op, Value location)
 Return the modify-reference behavior of op on location. More...
 

Detailed Description

This class represents the main alias analysis interface in MLIR.

It functions as an aggregate of various different alias analysis implementations. This aggregation allows for utilizing the strengths of different alias analysis implementations that either target or have access to different aliasing information. This is especially important for MLIR given the scope of different types of memory models and aliasing behaviors. For users of this analysis that want to perform aliasing queries, see the Alias Queries section below for the available methods. For users of this analysis that want to add a new alias analysis implementation to the aggregate, see the Alias Implementations section below.

Definition at line 232 of file AliasAnalysis.h.

Constructor & Destructor Documentation

◆ AliasAnalysis()

AliasAnalysis::AliasAnalysis ( Operation op)

Definition at line 76 of file AliasAnalysis.cpp.

Member Function Documentation

◆ addAnalysisImplementation()

template<typename AnalysisT >
void mlir::AliasAnalysis::addAnalysisImplementation ( AnalysisT &&  analysis)
inline

Add a new alias analysis implementation AnalysisT to this analysis aggregate.

This allows for users to access this implementation when performing alias queries. Implementations added here must provide the following:

Definition at line 258 of file AliasAnalysis.h.

◆ alias()

AliasResult AliasAnalysis::alias ( Value  lhs,
Value  rhs 
)

Given two values, return their aliasing behavior.

Definition at line 80 of file AliasAnalysis.cpp.

References mlir::AliasResult::isMay(), and mlir::AliasResult::MayAlias.

Referenced by mlir::affine::affineScalarReplace().

◆ getModRef()

ModRefResult AliasAnalysis::getModRef ( Operation op,
Value  location 
)

Return the modify-reference behavior of op on location.

Definition at line 90 of file AliasAnalysis.cpp.


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