MLIR  20.0.0git
Macros | Functions
OpenACC.cpp File Reference
#include "mlir/Dialect/OpenACC/OpenACC.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/TypeSwitch.h"
#include "mlir/Dialect/OpenACC/OpenACCOpsDialect.cpp.inc"
#include "mlir/Dialect/OpenACC/OpenACCOpsEnums.cpp.inc"
#include "mlir/Dialect/OpenACC/OpenACCOpsInterfaces.cpp.inc"
#include "mlir/Dialect/OpenACC/OpenACCTypeInterfaces.cpp.inc"
#include "mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.cpp.inc"
#include "mlir/Dialect/OpenACC/OpenACCOps.cpp.inc"
#include "mlir/Dialect/OpenACC/OpenACCOpsAttributes.cpp.inc"
#include "mlir/Dialect/OpenACC/OpenACCOpsTypes.cpp.inc"

Go to the source code of this file.

Macros

#define GET_OP_LIST
 
#define GET_ATTRDEF_LIST
 
#define GET_TYPEDEF_LIST
 
#define GET_OP_CLASSES
 
#define GET_ATTRDEF_CLASSES
 
#define GET_TYPEDEF_CLASSES
 

Functions

static bool hasDeviceTypeValues (std::optional< mlir::ArrayAttr > arrayAttr)
 
static bool hasDeviceType (std::optional< mlir::ArrayAttr > arrayAttr, mlir::acc::DeviceType deviceType)
 
static void printDeviceTypes (mlir::OpAsmPrinter &p, std::optional< mlir::ArrayAttr > deviceTypes)
 
static std::optional< unsigned > findSegment (ArrayAttr segments, mlir::acc::DeviceType deviceType)
 
static mlir::Operation::operand_range getValuesFromSegments (std::optional< mlir::ArrayAttr > arrayAttr, mlir::Operation::operand_range range, std::optional< llvm::ArrayRef< int32_t >> segments, mlir::acc::DeviceType deviceType)
 
static mlir::Value getWaitDevnumValue (std::optional< mlir::ArrayAttr > deviceTypeAttr, mlir::Operation::operand_range operands, std::optional< llvm::ArrayRef< int32_t >> segments, std::optional< mlir::ArrayAttr > hasWaitDevnum, mlir::acc::DeviceType deviceType)
 
static mlir::Operation::operand_range getWaitValuesWithoutDevnum (std::optional< mlir::ArrayAttr > deviceTypeAttr, mlir::Operation::operand_range operands, std::optional< llvm::ArrayRef< int32_t >> segments, std::optional< mlir::ArrayAttr > hasWaitDevnum, mlir::acc::DeviceType deviceType)
 
template<typename Op >
static LogicalResult checkWaitAndAsyncConflict (Op op)
 
template<typename StructureOp >
static ParseResult parseRegions (OpAsmParser &parser, OperationState &state, unsigned nRegions=1)
 
static bool isComputeOperation (Operation *op)
 
static LogicalResult verifyInitLikeSingleArgRegion (Operation *op, Region &region, StringRef regionType, StringRef regionName, Type type, bool verifyYield, bool optional=false)
 
static ParseResult parseSymOperandList (mlir::OpAsmParser &parser, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &operands, llvm::SmallVectorImpl< Type > &types, mlir::ArrayAttr &symbols)
 
static void printSymOperandList (mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::OperandRange operands, mlir::TypeRange types, std::optional< mlir::ArrayAttr > attributes)
 
template<typename Op >
static LogicalResult checkDataOperands (Op op, const mlir::ValueRange &operands)
 Check dataOperands for acc.parallel, acc.serial and acc.kernels. More...
 
template<typename Op >
static LogicalResult checkSymOperandList (Operation *op, std::optional< mlir::ArrayAttr > attributes, mlir::OperandRange operands, llvm::StringRef operandName, llvm::StringRef symbolName, bool checkOperandType=true)
 
template<typename Op >
static LogicalResult verifyDeviceTypeCountMatch (Op op, OperandRange operands, ArrayAttr deviceTypes, llvm::StringRef keyword)
 
template<typename Op >
static LogicalResult verifyDeviceTypeAndSegmentCountMatch (Op op, OperandRange operands, DenseI32ArrayAttr segments, ArrayAttr deviceTypes, llvm::StringRef keyword, int32_t maxInSegment=0)
 
static mlir::Value getValueInDeviceTypeSegment (std::optional< mlir::ArrayAttr > arrayAttr, mlir::Operation::operand_range range, mlir::acc::DeviceType deviceType)
 
static ParseResult parseNumGangs (mlir::OpAsmParser &parser, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &operands, llvm::SmallVectorImpl< Type > &types, mlir::ArrayAttr &deviceTypes, mlir::DenseI32ArrayAttr &segments)
 
static void printSingleDeviceType (mlir::OpAsmPrinter &p, mlir::Attribute attr)
 
static void printNumGangs (mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::OperandRange operands, mlir::TypeRange types, std::optional< mlir::ArrayAttr > deviceTypes, std::optional< mlir::DenseI32ArrayAttr > segments)
 
static ParseResult parseDeviceTypeOperandsWithSegment (mlir::OpAsmParser &parser, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &operands, llvm::SmallVectorImpl< Type > &types, mlir::ArrayAttr &deviceTypes, mlir::DenseI32ArrayAttr &segments)
 
static void printDeviceTypeOperandsWithSegment (mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::OperandRange operands, mlir::TypeRange types, std::optional< mlir::ArrayAttr > deviceTypes, std::optional< mlir::DenseI32ArrayAttr > segments)
 
static ParseResult parseWaitClause (mlir::OpAsmParser &parser, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &operands, llvm::SmallVectorImpl< Type > &types, mlir::ArrayAttr &deviceTypes, mlir::DenseI32ArrayAttr &segments, mlir::ArrayAttr &hasDevNum, mlir::ArrayAttr &keywordOnly)
 
static bool hasOnlyDeviceTypeNone (std::optional< mlir::ArrayAttr > attrs)
 
static void printWaitClause (mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::OperandRange operands, mlir::TypeRange types, std::optional< mlir::ArrayAttr > deviceTypes, std::optional< mlir::DenseI32ArrayAttr > segments, std::optional< mlir::ArrayAttr > hasDevNum, std::optional< mlir::ArrayAttr > keywordOnly)
 
static ParseResult parseDeviceTypeOperands (mlir::OpAsmParser &parser, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &operands, llvm::SmallVectorImpl< Type > &types, mlir::ArrayAttr &deviceTypes)
 
static void printDeviceTypeOperands (mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::OperandRange operands, mlir::TypeRange types, std::optional< mlir::ArrayAttr > deviceTypes)
 
static ParseResult parseDeviceTypeOperandsWithKeywordOnly (mlir::OpAsmParser &parser, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &operands, llvm::SmallVectorImpl< Type > &types, mlir::ArrayAttr &deviceTypes, mlir::ArrayAttr &keywordOnlyDeviceType)
 
static void printDeviceTypeOperandsWithKeywordOnly (mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::OperandRange operands, mlir::TypeRange types, std::optional< mlir::ArrayAttr > deviceTypes, std::optional< mlir::ArrayAttr > keywordOnlyDeviceTypes)
 
static ParseResult parseCombinedConstructsLoop (mlir::OpAsmParser &parser, mlir::acc::CombinedConstructsTypeAttr &attr)
 
static void printCombinedConstructsLoop (mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::acc::CombinedConstructsTypeAttr attr)
 
static ParseResult parseGangValue (OpAsmParser &parser, llvm::StringRef keyword, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &operands, llvm::SmallVectorImpl< Type > &types, llvm::SmallVector< GangArgTypeAttr > &attributes, GangArgTypeAttr gangArgType, bool &needCommaBetweenValues, bool &newValue)
 
static ParseResult parseGangClause (OpAsmParser &parser, llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &gangOperands, llvm::SmallVectorImpl< Type > &gangOperandsType, mlir::ArrayAttr &gangArgType, mlir::ArrayAttr &deviceType, mlir::DenseI32ArrayAttr &segments, mlir::ArrayAttr &gangOnlyDeviceType)
 
void printGangClause (OpAsmPrinter &p, Operation *op, mlir::OperandRange operands, mlir::TypeRange types, std::optional< mlir::ArrayAttr > gangArgTypes, std::optional< mlir::ArrayAttr > deviceTypes, std::optional< mlir::DenseI32ArrayAttr > segments, std::optional< mlir::ArrayAttr > gangOnlyDeviceTypes)
 
bool hasDuplicateDeviceTypes (std::optional< mlir::ArrayAttr > segments, llvm::SmallSet< mlir::acc::DeviceType, 3 > &deviceTypes)
 
LogicalResult checkDeviceTypes (mlir::ArrayAttr deviceTypes)
 Check for duplicates in the DeviceType array attribute. More...
 
ParseResult parseLoopControl (OpAsmParser &parser, Region &region, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &lowerbound, SmallVectorImpl< Type > &lowerboundType, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &upperbound, SmallVectorImpl< Type > &upperboundType, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &step, SmallVectorImpl< Type > &stepType)
 loop-control ::= control ( ssa-id-and-type-list ) = ( ssa-id-and-type-list ) to ( ssa-id-and-type-list ) step ( ssa-id-and-type-list ) region More...
 
void printLoopControl (OpAsmPrinter &p, Operation *op, Region &region, ValueRange lowerbound, TypeRange lowerboundType, ValueRange upperbound, TypeRange upperboundType, ValueRange steps, TypeRange stepType)
 
template<typename Op >
static LogicalResult checkDeclareOperands (Op &op, const mlir::ValueRange &operands, bool requireAtLeastOneOperand=true)
 
static unsigned getParallelismForDeviceType (acc::RoutineOp op, acc::DeviceType dtype)
 
static ParseResult parseBindName (OpAsmParser &parser, mlir::ArrayAttr &bindName, mlir::ArrayAttr &deviceTypes)
 
static void printBindName (mlir::OpAsmPrinter &p, mlir::Operation *op, std::optional< mlir::ArrayAttr > bindName, std::optional< mlir::ArrayAttr > deviceTypes)
 
static ParseResult parseRoutineGangClause (OpAsmParser &parser, mlir::ArrayAttr &gang, mlir::ArrayAttr &gangDim, mlir::ArrayAttr &gangDimDeviceTypes)
 
void printRoutineGangClause (OpAsmPrinter &p, Operation *op, std::optional< mlir::ArrayAttr > gang, std::optional< mlir::ArrayAttr > gangDim, std::optional< mlir::ArrayAttr > gangDimDeviceTypes)
 
static ParseResult parseDeviceTypeArrayAttr (OpAsmParser &parser, mlir::ArrayAttr &deviceTypes)
 
static void printDeviceTypeArrayAttr (mlir::OpAsmPrinter &p, mlir::Operation *op, std::optional< mlir::ArrayAttr > deviceTypes)
 

Macro Definition Documentation

◆ GET_ATTRDEF_CLASSES

#define GET_ATTRDEF_CLASSES

Definition at line 2866 of file OpenACC.cpp.

◆ GET_ATTRDEF_LIST

#define GET_ATTRDEF_LIST

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 2863 of file OpenACC.cpp.

◆ GET_OP_LIST

#define GET_OP_LIST

◆ GET_TYPEDEF_CLASSES

#define GET_TYPEDEF_CLASSES

Definition at line 2869 of file OpenACC.cpp.

◆ GET_TYPEDEF_LIST

#define GET_TYPEDEF_LIST

Function Documentation

◆ checkDataOperands()

template<typename Op >
static LogicalResult checkDataOperands ( Op  op,
const mlir::ValueRange operands 
)
static

Check dataOperands for acc.parallel, acc.serial and acc.kernels.

Definition at line 677 of file OpenACC.cpp.

References mlir::OpState::emitError().

◆ checkDeclareOperands()

template<typename Op >
static LogicalResult checkDeclareOperands ( Op op,
const mlir::ValueRange operands,
bool  requireAtLeastOneOperand = true 
)
static

◆ checkDeviceTypes()

LogicalResult checkDeviceTypes ( mlir::ArrayAttr  deviceTypes)

Check for duplicates in the DeviceType array attribute.

Definition at line 1811 of file OpenACC.cpp.

◆ checkSymOperandList()

template<typename Op >
static LogicalResult checkSymOperandList ( Operation op,
std::optional< mlir::ArrayAttr >  attributes,
mlir::OperandRange  operands,
llvm::StringRef  operandName,
llvm::StringRef  symbolName,
bool  checkOperandType = true 
)
static

Definition at line 692 of file OpenACC.cpp.

References mlir::Operation::emitOpError(), and mlir::Value::getType().

◆ checkWaitAndAsyncConflict()

template<typename Op >
static LogicalResult checkWaitAndAsyncConflict ( Op  op)
static

Definition at line 173 of file OpenACC.cpp.

References mlir::OpState::emitError(), and hasDeviceType().

◆ findSegment()

static std::optional<unsigned> findSegment ( ArrayAttr  segments,
mlir::acc::DeviceType  deviceType 
)
static

◆ getParallelismForDeviceType()

static unsigned getParallelismForDeviceType ( acc::RoutineOp  op,
acc::DeviceType  dtype 
)
static

Definition at line 2448 of file OpenACC.cpp.

◆ getValueInDeviceTypeSegment()

static mlir::Value getValueInDeviceTypeSegment ( std::optional< mlir::ArrayAttr >  arrayAttr,
mlir::Operation::operand_range  range,
mlir::acc::DeviceType  deviceType 
)
static

Definition at line 830 of file OpenACC.cpp.

References findSegment().

◆ getValuesFromSegments()

static mlir::Operation::operand_range getValuesFromSegments ( std::optional< mlir::ArrayAttr >  arrayAttr,
mlir::Operation::operand_range  range,
std::optional< llvm::ArrayRef< int32_t >>  segments,
mlir::acc::DeviceType  deviceType 
)
static

Definition at line 121 of file OpenACC.cpp.

References findSegment().

Referenced by getWaitDevnumValue(), and getWaitValuesWithoutDevnum().

◆ getWaitDevnumValue()

static mlir::Value getWaitDevnumValue ( std::optional< mlir::ArrayAttr >  deviceTypeAttr,
mlir::Operation::operand_range  operands,
std::optional< llvm::ArrayRef< int32_t >>  segments,
std::optional< mlir::ArrayAttr >  hasWaitDevnum,
mlir::acc::DeviceType  deviceType 
)
static

Definition at line 137 of file OpenACC.cpp.

References findSegment(), getValuesFromSegments(), and hasDeviceTypeValues().

◆ getWaitValuesWithoutDevnum()

static mlir::Operation::operand_range getWaitValuesWithoutDevnum ( std::optional< mlir::ArrayAttr >  deviceTypeAttr,
mlir::Operation::operand_range  operands,
std::optional< llvm::ArrayRef< int32_t >>  segments,
std::optional< mlir::ArrayAttr >  hasWaitDevnum,
mlir::acc::DeviceType  deviceType 
)
static

Definition at line 153 of file OpenACC.cpp.

References findSegment(), and getValuesFromSegments().

◆ hasDeviceType()

static bool hasDeviceType ( std::optional< mlir::ArrayAttr >  arrayAttr,
mlir::acc::DeviceType  deviceType 
)
static

Definition at line 83 of file OpenACC.cpp.

References hasDeviceTypeValues().

Referenced by checkWaitAndAsyncConflict().

◆ hasDeviceTypeValues()

static bool hasDeviceTypeValues ( std::optional< mlir::ArrayAttr >  arrayAttr)
static

◆ hasDuplicateDeviceTypes()

bool hasDuplicateDeviceTypes ( std::optional< mlir::ArrayAttr >  segments,
llvm::SmallSet< mlir::acc::DeviceType, 3 > &  deviceTypes 
)

Definition at line 1797 of file OpenACC.cpp.

◆ hasOnlyDeviceTypeNone()

static bool hasOnlyDeviceTypeNone ( std::optional< mlir::ArrayAttr >  attrs)
static

◆ isComputeOperation()

static bool isComputeOperation ( Operation op)
static

Definition at line 460 of file OpenACC.cpp.

◆ parseBindName()

static ParseResult parseBindName ( OpAsmParser parser,
mlir::ArrayAttr &  bindName,
mlir::ArrayAttr &  deviceTypes 
)
static

Definition at line 2481 of file OpenACC.cpp.

References mlir::AsmParser::parseCommaSeparatedList().

◆ parseCombinedConstructsLoop()

static ParseResult parseCombinedConstructsLoop ( mlir::OpAsmParser parser,
mlir::acc::CombinedConstructsTypeAttr &  attr 
)
static

◆ parseDeviceTypeArrayAttr()

static ParseResult parseDeviceTypeArrayAttr ( OpAsmParser parser,
mlir::ArrayAttr &  deviceTypes 
)
static

◆ parseDeviceTypeOperands()

static ParseResult parseDeviceTypeOperands ( mlir::OpAsmParser parser,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  operands,
llvm::SmallVectorImpl< Type > &  types,
mlir::ArrayAttr &  deviceTypes 
)
static

Definition at line 1200 of file OpenACC.cpp.

References mlir::AsmParser::parseCommaSeparatedList().

◆ parseDeviceTypeOperandsWithKeywordOnly()

static ParseResult parseDeviceTypeOperandsWithKeywordOnly ( mlir::OpAsmParser parser,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  operands,
llvm::SmallVectorImpl< Type > &  types,
mlir::ArrayAttr &  deviceTypes,
mlir::ArrayAttr &  keywordOnlyDeviceType 
)
static

◆ parseDeviceTypeOperandsWithSegment()

static ParseResult parseDeviceTypeOperandsWithSegment ( mlir::OpAsmParser parser,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  operands,
llvm::SmallVectorImpl< Type > &  types,
mlir::ArrayAttr &  deviceTypes,
mlir::DenseI32ArrayAttr segments 
)
static

◆ parseGangClause()

static ParseResult parseGangClause ( OpAsmParser parser,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  gangOperands,
llvm::SmallVectorImpl< Type > &  gangOperandsType,
mlir::ArrayAttr &  gangArgType,
mlir::ArrayAttr &  deviceType,
mlir::DenseI32ArrayAttr segments,
mlir::ArrayAttr &  gangOnlyDeviceType 
)
static

◆ parseGangValue()

static ParseResult parseGangValue ( OpAsmParser parser,
llvm::StringRef  keyword,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  operands,
llvm::SmallVectorImpl< Type > &  types,
llvm::SmallVector< GangArgTypeAttr > &  attributes,
GangArgTypeAttr  gangArgType,
bool &  needCommaBetweenValues,
bool &  newValue 
)
static

◆ parseLoopControl()

ParseResult parseLoopControl ( OpAsmParser parser,
Region region,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  lowerbound,
SmallVectorImpl< Type > &  lowerboundType,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  upperbound,
SmallVectorImpl< Type > &  upperboundType,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  step,
SmallVectorImpl< Type > &  stepType 
)

◆ parseNumGangs()

static ParseResult parseNumGangs ( mlir::OpAsmParser parser,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  operands,
llvm::SmallVectorImpl< Type > &  types,
mlir::ArrayAttr &  deviceTypes,
mlir::DenseI32ArrayAttr segments 
)
static

◆ parseRegions()

template<typename StructureOp >
static ParseResult parseRegions ( OpAsmParser parser,
OperationState state,
unsigned  nRegions = 1 
)
static

Definition at line 446 of file OpenACC.cpp.

◆ parseRoutineGangClause()

static ParseResult parseRoutineGangClause ( OpAsmParser parser,
mlir::ArrayAttr &  gang,
mlir::ArrayAttr &  gangDim,
mlir::ArrayAttr &  gangDimDeviceTypes 
)
static

◆ parseSymOperandList()

static ParseResult parseSymOperandList ( mlir::OpAsmParser parser,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  operands,
llvm::SmallVectorImpl< Type > &  types,
mlir::ArrayAttr &  symbols 
)
static

◆ parseWaitClause()

static ParseResult parseWaitClause ( mlir::OpAsmParser parser,
llvm::SmallVectorImpl< mlir::OpAsmParser::UnresolvedOperand > &  operands,
llvm::SmallVectorImpl< Type > &  types,
mlir::ArrayAttr &  deviceTypes,
mlir::DenseI32ArrayAttr segments,
mlir::ArrayAttr &  hasDevNum,
mlir::ArrayAttr &  keywordOnly 
)
static

◆ printBindName()

static void printBindName ( mlir::OpAsmPrinter p,
mlir::Operation op,
std::optional< mlir::ArrayAttr >  bindName,
std::optional< mlir::ArrayAttr >  deviceTypes 
)
static

Definition at line 2507 of file OpenACC.cpp.

References printSingleDeviceType().

◆ printCombinedConstructsLoop()

static void printCombinedConstructsLoop ( mlir::OpAsmPrinter p,
mlir::Operation op,
mlir::acc::CombinedConstructsTypeAttr  attr 
)
static

Definition at line 1346 of file OpenACC.cpp.

◆ printDeviceTypeArrayAttr()

static void printDeviceTypeArrayAttr ( mlir::OpAsmPrinter p,
mlir::Operation op,
std::optional< mlir::ArrayAttr >  deviceTypes 
)
static

Definition at line 2635 of file OpenACC.cpp.

References hasDeviceTypeValues(), and None.

◆ printDeviceTypeOperands()

static void printDeviceTypeOperands ( mlir::OpAsmPrinter p,
mlir::Operation op,
mlir::OperandRange  operands,
mlir::TypeRange  types,
std::optional< mlir::ArrayAttr >  deviceTypes 
)
static

Definition at line 1227 of file OpenACC.cpp.

References hasDeviceTypeValues(), and printSingleDeviceType().

Referenced by printDeviceTypeOperandsWithKeywordOnly().

◆ printDeviceTypeOperandsWithKeywordOnly()

static void printDeviceTypeOperandsWithKeywordOnly ( mlir::OpAsmPrinter p,
mlir::Operation op,
mlir::OperandRange  operands,
mlir::TypeRange  types,
std::optional< mlir::ArrayAttr >  deviceTypes,
std::optional< mlir::ArrayAttr >  keywordOnlyDeviceTypes 
)
static

◆ printDeviceTypeOperandsWithSegment()

static void printDeviceTypeOperandsWithSegment ( mlir::OpAsmPrinter p,
mlir::Operation op,
mlir::OperandRange  operands,
mlir::TypeRange  types,
std::optional< mlir::ArrayAttr >  deviceTypes,
std::optional< mlir::DenseI32ArrayAttr segments 
)
static

Definition at line 1054 of file OpenACC.cpp.

References mlir::detail::enumerate(), and printSingleDeviceType().

◆ printDeviceTypes()

static void printDeviceTypes ( mlir::OpAsmPrinter p,
std::optional< mlir::ArrayAttr >  deviceTypes 
)
static

◆ printGangClause()

void printGangClause ( OpAsmPrinter p,
Operation op,
mlir::OperandRange  operands,
mlir::TypeRange  types,
std::optional< mlir::ArrayAttr >  gangArgTypes,
std::optional< mlir::ArrayAttr >  deviceTypes,
std::optional< mlir::DenseI32ArrayAttr segments,
std::optional< mlir::ArrayAttr >  gangOnlyDeviceTypes 
)

◆ printLoopControl()

void printLoopControl ( OpAsmPrinter p,
Operation op,
Region region,
ValueRange  lowerbound,
TypeRange  lowerboundType,
ValueRange  upperbound,
TypeRange  upperboundType,
ValueRange  steps,
TypeRange  stepType 
)

◆ printNumGangs()

static void printNumGangs ( mlir::OpAsmPrinter p,
mlir::Operation op,
mlir::OperandRange  operands,
mlir::TypeRange  types,
std::optional< mlir::ArrayAttr >  deviceTypes,
std::optional< mlir::DenseI32ArrayAttr segments 
)
static

Definition at line 991 of file OpenACC.cpp.

References mlir::detail::enumerate(), and printSingleDeviceType().

◆ printRoutineGangClause()

void printRoutineGangClause ( OpAsmPrinter p,
Operation op,
std::optional< mlir::ArrayAttr >  gang,
std::optional< mlir::ArrayAttr >  gangDim,
std::optional< mlir::ArrayAttr >  gangDimDeviceTypes 
)

Definition at line 2578 of file OpenACC.cpp.

References hasDeviceTypeValues(), None, printDeviceTypes(), and printSingleDeviceType().

◆ printSingleDeviceType()

static void printSingleDeviceType ( mlir::OpAsmPrinter p,
mlir::Attribute  attr 
)
static

◆ printSymOperandList()

static void printSymOperandList ( mlir::OpAsmPrinter p,
mlir::Operation op,
mlir::OperandRange  operands,
mlir::TypeRange  types,
std::optional< mlir::ArrayAttr >  attributes 
)
static

Definition at line 661 of file OpenACC.cpp.

◆ printWaitClause()

static void printWaitClause ( mlir::OpAsmPrinter p,
mlir::Operation op,
mlir::OperandRange  operands,
mlir::TypeRange  types,
std::optional< mlir::ArrayAttr >  deviceTypes,
std::optional< mlir::DenseI32ArrayAttr segments,
std::optional< mlir::ArrayAttr >  hasDevNum,
std::optional< mlir::ArrayAttr >  keywordOnly 
)
static

◆ verifyDeviceTypeAndSegmentCountMatch()

template<typename Op >
static LogicalResult verifyDeviceTypeAndSegmentCountMatch ( Op  op,
OperandRange  operands,
DenseI32ArrayAttr  segments,
ArrayAttr  deviceTypes,
llvm::StringRef  keyword,
int32_t  maxInSegment = 0 
)
static

◆ verifyDeviceTypeCountMatch()

template<typename Op >
static LogicalResult verifyDeviceTypeCountMatch ( Op  op,
OperandRange  operands,
ArrayAttr  deviceTypes,
llvm::StringRef  keyword 
)
static

Definition at line 748 of file OpenACC.cpp.

References mlir::OpState::emitOpError().

◆ verifyInitLikeSingleArgRegion()

static LogicalResult verifyInitLikeSingleArgRegion ( Operation op,
Region region,
StringRef  regionType,
StringRef  regionName,
Type  type,
bool  verifyYield,
bool  optional = false 
)
static