MLIR 24.0.0git
ACCDataRuntime.h File Reference
#include "mlir/Dialect/OpenACC/OpenACCRuntimeUtils.h"
#include "mlir/IR/Value.h"
#include "llvm/ADT/SmallVector.h"
#include <cstdint>

Go to the source code of this file.

Classes

struct  mlir::ACCDataRuntimeArgs
 The arguments every mapping entry point of the OpenACC runtime takes, in the order they are passed. More...
struct  mlir::ACCDataCallOptions
 What a data runtime call is asked for besides mapping its operands. More...
struct  mlir::ACCMappedObjectArgs
 The values that describe one object to the runtime, one for each argument array. More...

Namespaces

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

Enumerations

enum class  mlir::ACCDataCallKind { mlir::DataEnter , mlir::DataExit }
 Identifies how data runtime arguments will be consumed. More...
enum class  mlir::ACCDataRegionFlags : int64_t { mlir::None = 0 , mlir::Implicit = 1 }
 Flags of __tgt_acc_data_begin and __tgt_acc_data_end. More...

Functions

Value mlir::createACCDataArray (Location loc, Type elementType, ArrayRef< Value > values, RewriterBase &rewriter)
 Materialize values as a stack-allocated LLVM array.
void mlir::createACCMappedObjectArrays (Location loc, ArrayRef< ACCMappedObjectArgs > objects, ACCDataRuntimeArgs &runtimeArgs, RewriterBase &rewriter)
 Materialize the argument arrays of objects into the argNum through argDescs fields of runtimeArgs.
Value mlir::createACCMappedObjectPointer (Location loc, Value operand, Value converted, acc::MapFlags mapFlags, ConversionPatternRewriter &rewriter)
 The address of operand as the runtime expects to receive it, given its type converted value converted and its mapFlags.
Value mlir::createACCMappedObjectBase (Location loc, Operation *mapOp, acc::MapFlags mapFlags, ConversionPatternRewriter &rewriter)
 The host pointer slot the object mapOp maps is attached to, or a null pointer when it is not attached.
FailureOr< Value > mlir::createACCMappedObjectSize (Location loc, Value operand, Value converted, acc::MapFlags mapFlags, acc::OpenACCSupport &accSupport, ConversionPatternRewriter &rewriter)
 The size in bytes of operand, or zero where its descriptor or bounds state the extent instead.
Value mlir::createACCMappedObjectName (Location loc, Value operand, acc::OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable *symbolTable, ConversionPatternRewriter &rewriter)
 The name of operand for runtime diagnostics, or a null pointer when it has none.
Value mlir::createACCDataDescriptor (Location loc, Value baseDescriptor, Type baseDescriptorType, uint32_t version, ValueRange bounds, Value elementSize, ConversionPatternRewriter &rewriter)
 Wrap baseDescriptor in the OpenACC overlay that carries bounds.
Value mlir::createACCMemRefDescriptorWrapperArg (Location loc, MemRefType memrefType, Value convertedMemref, ValueRange bounds, Value elementSize, ConversionPatternRewriter &rewriter)
 Build the runtime argument descriptor wrapping an already converted memref.
Value mlir::createACCArgumentDescriptor (Operation *mapOp, Value convertedOperand, acc::OpenACCSupport &accSupport, ConversionPatternRewriter &rewriter)
 Build the runtime argument descriptor for mapOp, or a null pointer when the mapping needs no descriptor.
LogicalResult mlir::emitACCDataRuntimeArgs (Location loc, ValueRange mappingOperands, ValueRange convertedOperands, ConversionPatternRewriter &rewriter, Region &globalSymbolRegion, acc::OpenACCSupport &accSupport, const acc::ACCRuntimeCallConfig &config, ACCDataRuntimeArgs &runtimeArgs, const ACCDataCallOptions &options={}, SymbolTable *symbolTable=nullptr)
 Emit the OpenACC data runtime arguments for data-clause operands.
FailureOr< SmallVector< Value > > mlir::emitACCDataRuntimeCall (Location loc, acc::RuntimeFunction fn, ValueRange mappingOperands, ValueRange convertedOperands, ConversionPatternRewriter &rewriter, acc::OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable &symbolTable, const acc::ACCRuntimeCallConfig &config, ArrayRef< Value > trailingArguments, const ACCDataCallOptions &options={})
 Emit the call to the mapping entry point fn for mappingOperands, followed by trailingArguments.