15#ifndef MLIR_CONVERSION_OPENACCTOLLVM_ACCDATARUNTIME_H
16#define MLIR_CONVERSION_OPENACCTOLLVM_ACCDATARUNTIME_H
20#include "llvm/ADT/SmallVector.h"
27class ConversionPatternRewriter;
80 RewriterBase &rewriter);
86 Type baseDescriptorType, uint32_t version,
88 ConversionPatternRewriter &rewriter);
96 Value convertedMemref,
98 ConversionPatternRewriter &rewriter);
103 acc::OpenACCSupport &accSupport,
104 ConversionPatternRewriter &rewriter);
113 ConversionPatternRewriter &rewriter, Region &globalSymbolRegion,
114 acc::OpenACCSupport &accSupport,
const acc::ACCRuntimeCallConfig &config,
115 ACCDataRuntimeArgs &runtimeArgs,
117 SymbolTable *symbolTable =
nullptr);
Operation is the basic unit of execution within MLIR.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
This class allows for representing and managing the symbol table used by operations with the 'SymbolT...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Include the generated interface declarations.
Value createACCDataArray(Location loc, Type elementType, ArrayRef< Value > values, RewriterBase &rewriter)
Materialize values as a stack-allocated LLVM array.
Value 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.
ACCDataCallKind
Identifies how data runtime arguments will be consumed.
Value 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 descript...
LogicalResult emitACCDataRuntimeArgs(Location loc, ValueRange mappingOperands, ValueRange convertedOperands, ConversionPatternRewriter &rewriter, Region &globalSymbolRegion, acc::OpenACCSupport &accSupport, const acc::ACCRuntimeCallConfig &config, ACCDataRuntimeArgs &runtimeArgs, ACCDataCallKind callKind=ACCDataCallKind::DataEnter, SymbolTable *symbolTable=nullptr)
Emit the OpenACC data runtime arguments for data-clause operands.
Value createACCMemRefDescriptorWrapperArg(Location loc, MemRefType memrefType, Value convertedMemref, ValueRange bounds, Value elementSize, ConversionPatternRewriter &rewriter)
Build the runtime argument descriptor wrapping an already converted memref.
The arguments every mapping entry point of the OpenACC runtime takes, in the order they are passed.
Value argNames
Array of variable names for runtime diagnostics, null where unknown.
Value deviceType
Device type the directive applies to, in the runtime encoding.
Value argSizes
Array of object sizes in bytes; zero where the descriptor or the bounds state the extent instead.
Value argMappers
Array of user-defined mappers. OpenACC has none, so this is always null.
Value ident
Source position and enclosing function name of the directive.
Value argTypes
Array of map-type flags, in the runtime encoding of acc::MapFlags.
SmallVector< Value > getCallArgs() const
Returns the fields above in the order the entry points take them, so that a caller only appends the a...
Value argBasePtrs
Array of pointer slots to attach a mapped object to, null when the object is not attached to anything...
Value argNum
Number of mapped objects, that is, the length of each array below.
Value argDescs
Array of descriptors stating layout and bounds, null for whole objects of a known size.
Value flags
Reserved for per-call runtime flags; no flag is defined yet.
Value argPtrs
Array of addresses of the mapped objects themselves.