|
MLIR 23.0.0git
|
#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. | |
| std::string | getVariableName (Value v) |
| Get the variable name for a given value. | |
| std::string | getRecipeName (RecipeKind kind, Type type, Value var) |
| Get the recipe name for a given type and value. | |
| InFlightDiagnostic | emitNYI (Location loc, const Twine &message) |
| Report a case that is not yet supported by the implementation. | |
| remark::detail::InFlightRemark | emitRemark (Operation *op, std::function< std::string()> messageFn, llvm::StringRef category="openacc") |
| Emit an OpenACC remark with lazy message generation. | |
| remark::detail::InFlightRemark | emitRemark (Operation *op, const Twine &message, llvm::StringRef category="openacc") |
| Emit an OpenACC remark. | |
| bool | isValidSymbolUse (Operation *user, SymbolRefAttr symbol, Operation **definingOpPtr=nullptr) |
| Check if a symbol use is valid for use in an OpenACC region. | |
| bool | isValidValueUse (Value v, Region ®ion) |
| Check if a value use is legal in an OpenACC region. | |
| std::optional< gpu::GPUModuleOp > | getOrCreateGPUModule (ModuleOp mod, bool create=true, llvm::StringRef name="") |
| Get or optionally create a GPU module in the given module. | |
| bool | isInvalidated (const AnalysisManager::PreservedAnalyses &pa) |
| Signal that this analysis should always be preserved so that underlying implementation registration is not lost. | |
Definition at line 210 of file OpenACCSupport.h.
|
default |
|
inline |
Definition at line 217 of file OpenACCSupport.h.
| InFlightDiagnostic mlir::acc::OpenACCSupport::emitNYI | ( | Location | loc, |
| const Twine & | message ) |
Report a case that is not yet supported by the implementation.
| loc | The location to report the unsupported case at. |
| message | The message to report. |
Definition at line 39 of file OpenACCSupport.cpp.
References mlir::emitError().
Referenced by getRecipeName().
|
inline |
Emit an OpenACC remark.
| op | The operation to emit the remark for. |
| message | The remark message. |
| category | Optional category for the remark. Defaults to "openacc". |
Definition at line 275 of file OpenACCSupport.h.
References emitRemark().
| remark::detail::InFlightRemark mlir::acc::OpenACCSupport::emitRemark | ( | Operation * | op, |
| std::function< std::string()> | messageFn, | ||
| llvm::StringRef | category = "openacc" ) |
Emit an OpenACC remark with lazy message generation.
The messageFn is only invoked if remarks are enabled for the given operation, allowing callers to avoid constructing expensive messages when remarks are disabled.
| op | The operation to emit the remark for. |
| messageFn | A callable that returns the remark message. |
| category | Optional category for the remark. Defaults to "openacc". |
Definition at line 46 of file OpenACCSupport.cpp.
References mlir::acc::emitRemark().
Referenced by emitRemark().
| std::optional< gpu::GPUModuleOp > mlir::acc::OpenACCSupport::getOrCreateGPUModule | ( | ModuleOp | mod, |
| bool | create = true, | ||
| llvm::StringRef | name = "" ) |
Get or optionally create a GPU module in the given module.
| mod | The module to search or create the GPU module in. |
| create | If true (default), create the GPU module if it doesn't exist. |
| name | The name for the GPU module. If empty, implementation uses its default name. |
Definition at line 68 of file OpenACCSupport.cpp.
References mlir::acc::getOrCreateGPUModule().
Get the recipe name for a given type and value.
| kind | The kind of recipe to get the name for. |
| type | The type to get the recipe name for. Can be null if the var is provided instead. |
| var | The MLIR value to get the recipe name for. Can be null if the type is provided instead. |
Definition at line 26 of file OpenACCSupport.cpp.
References emitNYI(), mlir::Type::getContext(), mlir::Value::getLoc(), and mlir::acc::getRecipeName().
| std::string mlir::acc::OpenACCSupport::getVariableName | ( | Value | v | ) |
Get the variable name for a given value.
| v | The MLIR value to get the variable name for. |
Definition at line 20 of file OpenACCSupport.cpp.
References mlir::acc::getVariableName().
|
inline |
Signal that this analysis should always be preserved so that underlying implementation registration is not lost.
Definition at line 312 of file OpenACCSupport.h.
| bool mlir::acc::OpenACCSupport::isValidSymbolUse | ( | Operation * | user, |
| SymbolRefAttr | symbol, | ||
| Operation ** | definingOpPtr = nullptr ) |
Check if a symbol use is valid for use in an OpenACC region.
| user | The operation using the symbol. |
| symbol | The symbol reference being used. |
| definingOpPtr | Optional output parameter to receive the defining op. |
Definition at line 54 of file OpenACCSupport.cpp.
References mlir::acc::isValidSymbolUse().
Check if a value use is legal in an OpenACC region.
| v | The MLIR value to check for legality. |
| region | The MLIR region in which the legality is checked. |
Definition at line 61 of file OpenACCSupport.cpp.
References mlir::acc::isValidValueUse().
|
inline |
Register a custom OpenACCSupport implementation.
Only one implementation can be registered at a time; calling this replaces any existing implementation.
Definition at line 223 of file OpenACCSupport.h.