MLIR  16.0.0git
Macros | Functions
VectorToSPIRV.cpp File Reference
#include "mlir/Conversion/VectorToSPIRV/VectorToSPIRV.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
#include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include <numeric>
+ Include dependency graph for VectorToSPIRV.cpp:

Go to the source code of this file.

Macros

#define INT_AND_FLOAT_CASE(kind, iop, fop)
 
#define INT_OR_FLOAT_CASE(kind, fop)
 
#define CL_MAX_MIN_OPS
 
#define GL_MAX_MIN_OPS
 

Functions

static uint64_t getFirstIntValue (ArrayAttr attr)
 Gets the first integer value from attr, assuming it is an integer array attribute. More...
 

Macro Definition Documentation

◆ CL_MAX_MIN_OPS

#define CL_MAX_MIN_OPS
Value:
spirv::CLFMaxOp, spirv::CLFMinOp, spirv::CLUMaxOp, spirv::CLUMinOp, \
spirv::CLSMaxOp, spirv::CLSMinOp

Definition at line 408 of file VectorToSPIRV.cpp.

◆ GL_MAX_MIN_OPS

#define GL_MAX_MIN_OPS
Value:
spirv::GLFMaxOp, spirv::GLFMinOp, spirv::GLUMaxOp, spirv::GLUMinOp, \
spirv::GLSMaxOp, spirv::GLSMinOp

Definition at line 412 of file VectorToSPIRV.cpp.

◆ INT_AND_FLOAT_CASE

#define INT_AND_FLOAT_CASE (   kind,
  iop,
  fop 
)
Value:
case vector::CombiningKind::kind: \
if (resultType.isa<IntegerType>()) { \
result = rewriter.create<spirv::iop>(loc, resultType, result, next); \
} else { \
assert(resultType.isa<FloatType>()); \
result = rewriter.create<spirv::fop>(loc, resultType, result, next); \
} \
break

◆ INT_OR_FLOAT_CASE

#define INT_OR_FLOAT_CASE (   kind,
  fop 
)
Value:
case vector::CombiningKind::kind: \
result = rewriter.create<fop>(loc, resultType, result, next); \
break

Function Documentation

◆ getFirstIntValue()

static uint64_t getFirstIntValue ( ArrayAttr  attr)
static

Gets the first integer value from attr, assuming it is an integer array attribute.

Definition at line 31 of file VectorToSPIRV.cpp.

Referenced by BubbleDownVectorBitCastForExtract::matchAndRewrite().