MLIR 24.0.0git
OpenACCCG.cpp File Reference
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/GPU/IR/GPUBase.h"
#include "mlir/Dialect/OpenACC/OpenACC.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Region.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/RegionUtils.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"

Go to the source code of this file.

Functions

template<typename ComputeConstructT>
static bool extractAsyncClause (ComputeConstructT computeConstruct, DeviceType clauseDeviceType, MLIRContext *context, std::optional< Value > &asyncOperand, UnitAttr &asyncOnly)
 Extract async for clauseDeviceType. Returns true if a clause was found.
template<typename ComputeConstructT>
static bool extractWaitClause (ComputeConstructT computeConstruct, DeviceType clauseDeviceType, MLIRContext *context, std::optional< Value > &waitDevnum, SmallVectorImpl< Value > &waitOperands, UnitAttr &waitOnly)
 Extract wait for clauseDeviceType. Returns true if a clause was found.
template<typename ComputeConstructT>
static void populateKernelEnvironmentAsyncWait (ComputeConstructT computeConstruct, DeviceType deviceType, std::optional< Value > &asyncOperand, UnitAttr &asyncOnly, std::optional< Value > &waitDevnum, SmallVectorImpl< Value > &waitOperands, UnitAttr &waitOnly)
static ParWidthOp getParWidthOpForLaunchArg (ComputeRegionOp op, GPUParallelDimAttr parDim)

Function Documentation

◆ extractAsyncClause()

template<typename ComputeConstructT>
bool extractAsyncClause ( ComputeConstructT computeConstruct,
DeviceType clauseDeviceType,
MLIRContext * context,
std::optional< Value > & asyncOperand,
UnitAttr & asyncOnly )
static

Extract async for clauseDeviceType. Returns true if a clause was found.

Definition at line 398 of file OpenACCCG.cpp.

Referenced by populateKernelEnvironmentAsyncWait().

◆ extractWaitClause()

template<typename ComputeConstructT>
bool extractWaitClause ( ComputeConstructT computeConstruct,
DeviceType clauseDeviceType,
MLIRContext * context,
std::optional< Value > & waitDevnum,
SmallVectorImpl< Value > & waitOperands,
UnitAttr & waitOnly )
static

Extract wait for clauseDeviceType. Returns true if a clause was found.

Definition at line 414 of file OpenACCCG.cpp.

Referenced by populateKernelEnvironmentAsyncWait().

◆ getParWidthOpForLaunchArg()

ParWidthOp getParWidthOpForLaunchArg ( ComputeRegionOp op,
GPUParallelDimAttr parDim )
static

Definition at line 640 of file OpenACCCG.cpp.

◆ populateKernelEnvironmentAsyncWait()

template<typename ComputeConstructT>
void populateKernelEnvironmentAsyncWait ( ComputeConstructT computeConstruct,
DeviceType deviceType,
std::optional< Value > & asyncOperand,
UnitAttr & asyncOnly,
std::optional< Value > & waitDevnum,
SmallVectorImpl< Value > & waitOperands,
UnitAttr & waitOnly )
static

Definition at line 434 of file OpenACCCG.cpp.

References extractAsyncClause(), and extractWaitClause().