MLIR 24.0.0git
OpenACCRuntimeUtils.h File Reference
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/OpenACC/OpenACC.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Region.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
#include <cstdint>
#include <functional>
#include <string>
#include "mlir/Dialect/OpenACC/OpenACCRuntimeFunctions.def"
#include "mlir/Dialect/OpenACC/OpenACCRuntimeDescriptors.def"

Go to the source code of this file.

Classes

class  mlir::acc::ACCRuntimeCallConfig
 Configuration for OpenACC to LLVM runtime lowering. More...

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::acc

Macros

#define ACC_RTL(Enum, ...)
#define ACC_DESC_BEGIN(Enum, ...)
 Field indices of each descriptor, in declaration order.
#define ACC_DESC_BEGIN(Enum, ...)
 Field indices of each descriptor, in declaration order.
#define ACC_DESC_FIELD(Enum, Field, TypeToken)
#define ACC_DESC_END(Enum)

Enumerations

enum class  mlir::acc::RuntimeFunction
 IDs for OpenACC compiler-to-runtime entry points (__tgt_acc_*). More...
enum class  mlir::acc::DataDescriptor
 IDs for the argument descriptors of the OpenACC data entry points, declared in OpenACCRuntimeDescriptors.def. More...

Functions

StringRef mlir::acc::getRuntimeFunctionName (RuntimeFunction fn)
 Returns the default runtime symbol name for fn.
LLVM::LLVMFunctionType mlir::acc::getRuntimeFunctionType (MLIRContext *ctx, RuntimeFunction fn)
 Builds the LLVM function type for fn in ctx.
template<typename FieldEnum>
int64_t mlir::acc::getDataDescriptorFieldIndex (FieldEnum field)
 The index an insert or extract of field addresses.
StringRef mlir::acc::getDataDescriptorName (DataDescriptor desc)
 Returns the name of the runtime type desc materializes.
DataDescKind mlir::acc::getDataDescriptorKind (DataDescriptor desc)
 Returns the descriptor kind the runtime reads from the version field of desc.
LLVM::LLVMStructType mlir::acc::getDataDescriptorType (MLIRContext *ctx, DataDescriptor desc, Type baseType={})
 Builds the LLVM type of desc in ctx.
void mlir::acc::populateDialectIdentityDeviceTypeMapping (ACCRuntimeCallConfig &config)
 Install a device-type mapping that uses OpenACC dialect enum ordinals as the runtime encoding.
void mlir::acc::populateDialectIdentityMapFlagsMapping (ACCRuntimeCallConfig &config)
 Install a map-flag mapping that uses the OpenACC dialect bit positions as the runtime encoding, with the same caveat as populateDialectIdentityDeviceTypeMapping.
FailureOr< LLVM::CallOp > mlir::acc::createRuntimeCall (Location loc, OpBuilder &builder, Region &globalSymbolRegion, SymbolTable &symbolTable, 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 config.

Macro Definition Documentation

◆ ACC_DESC_BEGIN [1/2]

#define ACC_DESC_BEGIN ( Enum,
... )
Value:
Enum,

Field indices of each descriptor, in declaration order.

Definition at line 50 of file OpenACCRuntimeUtils.h.

◆ ACC_DESC_BEGIN [2/2]

#define ACC_DESC_BEGIN ( Enum,
... )
Value:
enum class Enum##Field : int64_t {

Field indices of each descriptor, in declaration order.

Definition at line 50 of file OpenACCRuntimeUtils.h.

◆ ACC_DESC_END

#define ACC_DESC_END ( Enum)
Value:
} \
;

Definition at line 57 of file OpenACCRuntimeUtils.h.

◆ ACC_DESC_FIELD

#define ACC_DESC_FIELD ( Enum,
Field,
TypeToken )
Value:
Field,

Definition at line 56 of file OpenACCRuntimeUtils.h.

◆ ACC_RTL

#define ACC_RTL ( Enum,
... )
Value:
Enum,

Definition at line 36 of file OpenACCRuntimeUtils.h.