MLIR  22.0.0git
Public Member Functions | List of all members
mlir::acc::OpenACCSupport Class Reference

#include "mlir/Dialect/OpenACC/Analysis/OpenACCSupport.h"

Public Member Functions

 OpenACCSupport ()=default
 
 OpenACCSupport (Operation *op)
 
template<typename AnalysisT >
void setImplementation (AnalysisT &&analysis)
 Register a custom OpenACCSupport implementation. More...
 
std::string getVariableName (Value v)
 Get the variable name for a given value. More...
 
std::string getRecipeName (RecipeKind kind, Type type, Value var)
 Get the recipe name for a given type and value. More...
 
InFlightDiagnostic emitNYI (Location loc, const Twine &message)
 Report a case that is not yet supported by the implementation. More...
 
bool isInvalidated (const AnalysisManager::PreservedAnalyses &pa)
 Signal that this analysis should always be preserved so that underlying implementation registration is not lost. More...
 

Detailed Description

Definition at line 115 of file OpenACCSupport.h.

Constructor & Destructor Documentation

◆ OpenACCSupport() [1/2]

mlir::acc::OpenACCSupport::OpenACCSupport ( )
default

◆ OpenACCSupport() [2/2]

mlir::acc::OpenACCSupport::OpenACCSupport ( Operation op)
inline

Definition at line 122 of file OpenACCSupport.h.

Member Function Documentation

◆ emitNYI()

InFlightDiagnostic mlir::acc::OpenACCSupport::emitNYI ( Location  loc,
const Twine &  message 
)

Report a case that is not yet supported by the implementation.

Parameters
locThe location to report the unsupported case at.
messageThe message to report.
Returns
An in-flight diagnostic object that can be used to report the unsupported case.

Definition at line 38 of file OpenACCSupport.cpp.

References mlir::emitError().

Referenced by getRecipeName().

◆ getRecipeName()

std::string mlir::acc::OpenACCSupport::getRecipeName ( RecipeKind  kind,
Type  type,
Value  var 
)

Get the recipe name for a given type and value.

Parameters
kindThe kind of recipe to get the name for.
typeThe type to get the recipe name for. Can be null if the var is provided instead.
varThe MLIR value to get the recipe name for. Can be null if the type is provided instead.
Returns
The recipe name, or an empty string if not available.

Definition at line 25 of file OpenACCSupport.cpp.

References emitNYI(), mlir::get(), mlir::Type::getContext(), mlir::Value::getLoc(), mlir::acc::getRecipeName(), and kind.

◆ getVariableName()

std::string mlir::acc::OpenACCSupport::getVariableName ( Value  v)

Get the variable name for a given value.

Parameters
vThe MLIR value to get the variable name for.
Returns
The variable name, or an empty string if unavailable.

Definition at line 19 of file OpenACCSupport.cpp.

References mlir::acc::getVariableName().

◆ isInvalidated()

bool mlir::acc::OpenACCSupport::isInvalidated ( const AnalysisManager::PreservedAnalyses pa)
inline

Signal that this analysis should always be preserved so that underlying implementation registration is not lost.

Definition at line 159 of file OpenACCSupport.h.

◆ setImplementation()

template<typename AnalysisT >
void mlir::acc::OpenACCSupport::setImplementation ( AnalysisT &&  analysis)
inline

Register a custom OpenACCSupport implementation.

Only one implementation can be registered at a time; calling this replaces any existing implementation.

Definition at line 128 of file OpenACCSupport.h.

References mlir::remark::analysis().


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