14#ifndef MLIR_DIALECT_OPENACC_OPENACCRUNTIMEUTILS_H
15#define MLIR_DIALECT_OPENACC_OPENACCRUNTIMEUTILS_H
21#include "llvm/ADT/ArrayRef.h"
22#include "llvm/ADT/DenseMap.h"
23#include "llvm/ADT/StringRef.h"
34#define ACC_RTL(Enum, ...) Enum,
35#include "mlir/Dialect/OpenACC/OpenACCRuntimeFunctions.def"
80 int64_t asyncSyncRuntimeValue = -1;
81 int64_t asyncNoValueRuntimeValue = -4;
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class helps build Operations.
Optional overrides for OpenACC to LLVM runtime lowering.
int64_t getAsyncNoValueRuntimeValue() const
StringRef getName(RuntimeFunction fn) const
std::string getFunctionDisplayName(StringRef mangledOrSymbol) const
int64_t getAsyncSyncRuntimeValue() const
void setName(RuntimeFunction fn, StringRef name)
void setAsyncSyncRuntimeValue(int64_t runtimeValue)
Runtime encoding of acc_async_sync, used when an operation carries no async clause.
void setDeviceTypeRuntimeValue(DeviceType type, int64_t runtimeValue)
Map an OpenACC dialect DeviceType to the integer encoding expected by the target runtime.
int64_t getDeviceTypeRuntimeValue(DeviceType type) const
void setFunctionDisplayNameFn(FunctionDisplayNameFn fn)
std::function< std::string(StringRef)> FunctionDisplayNameFn
void setAsyncNoValueRuntimeValue(int64_t runtimeValue)
Runtime encoding of acc_async_noval, used for an async clause without an argument.
LLVM::LLVMFunctionType getRuntimeFunctionType(MLIRContext *ctx, RuntimeFunction fn)
Builds the LLVM function type for fn in ctx.
void populateDialectIdentityDeviceTypeMapping(ACCRuntimeCallConfig &config)
Install a device-type mapping that uses OpenACC dialect enum ordinals as the runtime encoding.
StringRef getRuntimeFunctionName(RuntimeFunction fn)
Returns the default runtime symbol name for fn.
FailureOr< LLVM::CallOp > createRuntimeCall(Location loc, OpBuilder &builder, ModuleOp module, RuntimeFunction fn, const ACCRuntimeCallConfig &config, ArrayRef< Value > arguments)
Declares (if needed) and returns a call to the runtime function identified by fn using the name from ...
RuntimeFunction
IDs for OpenACC compiler-to-runtime entry points (__tgt_acc_*).
Include the generated interface declarations.
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT > DenseMap