MLIR 24.0.0git
ACCDataRuntime.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "acc-data-runtime"

Functions

static Value remap (Value value, ConversionPatternRewriter &rewriter)
static Value constantI64 (Location loc, int64_t value, ConversionPatternRewriter &rewriter)
static Value getPointer (Location loc, Value value, ConversionPatternRewriter &rewriter)
static Value getIndirectPointer (Location loc, Value value, ConversionPatternRewriter &rewriter)
 Returns the address of a slot holding value, so that the runtime reads the value from memory rather than receiving it directly.
static Value getMappedObjectPointer (Location loc, Value operand, Value converted, MapFlags mapFlags, ConversionPatternRewriter &rewriter)
 The address of the mapped object, as the runtime expects to receive it.
static std::optional< MapFlags > computePackedMapFlags (Operation *mapOp)
static Value getMapSize (Operation *mapOp, Value converted, MapFlags mapFlags, OpenACCSupport &accSupport, ConversionPatternRewriter &rewriter)
static Value getElementSize (Operation *mapOp, OpenACCSupport &accSupport, ConversionPatternRewriter &rewriter)
static Value getBoundValue (Value value, Location loc, ConversionPatternRewriter &rewriter)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "acc-data-runtime"

Definition at line 27 of file ACCDataRuntime.cpp.

Function Documentation

◆ computePackedMapFlags()

std::optional< MapFlags > computePackedMapFlags ( Operation * mapOp)
static

◆ constantI64()

Value constantI64 ( Location loc,
int64_t value,
ConversionPatternRewriter & rewriter )
static

◆ getBoundValue()

Value getBoundValue ( Value value,
Location loc,
ConversionPatternRewriter & rewriter )
static

Definition at line 172 of file ACCDataRuntime.cpp.

References mlir::acc::castToI64(), constantI64(), and remap().

Referenced by mlir::createACCDataDescriptor().

◆ getElementSize()

Value getElementSize ( Operation * mapOp,
OpenACCSupport & accSupport,
ConversionPatternRewriter & rewriter )
static

◆ getIndirectPointer()

Value getIndirectPointer ( Location loc,
Value value,
ConversionPatternRewriter & rewriter )
static

Returns the address of a slot holding value, so that the runtime reads the value from memory rather than receiving it directly.

Definition at line 65 of file ACCDataRuntime.cpp.

References mlir::Value::getType().

Referenced by getMappedObjectPointer().

◆ getMappedObjectPointer()

Value getMappedObjectPointer ( Location loc,
Value operand,
Value converted,
MapFlags mapFlags,
ConversionPatternRewriter & rewriter )
static

The address of the mapped object, as the runtime expects to receive it.

Privatized storage only ever exists on the device, so there is no host address to give. A device address names storage the runtime must not look up, and an object mapped by value has no address at all, so both are handed over in a slot the runtime reads them from.

Definition at line 96 of file ACCDataRuntime.cpp.

References getIndirectPointer(), getPointer(), and mlir::Value::getType().

Referenced by mlir::emitACCDataRuntimeArgs().

◆ getMapSize()

◆ getPointer()

◆ remap()

Value remap ( Value value,
ConversionPatternRewriter & rewriter )
static