MLIR  20.0.0git
Namespaces | Macros | Functions
Specialize.cpp File Reference
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/IR/LinalgInterfaces.h"
#include "mlir/Dialect/Linalg/Passes.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Math/IR/Math.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/TypeID.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/Support/Debug.h"
#include "mlir/Dialect/Linalg/Passes.h.inc"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 

Macros

#define GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS
 
#define DEBUG_TYPE   "linalg-specialization"
 
#define REPLACE_BINARY_OP(NEWOP, OPERANDS_SWAP)
 
#define REPLACE_UNARY_OP(NEWOP)
 

Functions

static bool areBinOpsSwapped (GenericOp genericOp)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "linalg-specialization"

Definition at line 30 of file Specialize.cpp.

◆ GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS

#define GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS

Definition at line 26 of file Specialize.cpp.

◆ REPLACE_BINARY_OP

#define REPLACE_BINARY_OP (   NEWOP,
  OPERANDS_SWAP 
)
Value:
(rewriter.replaceOpWithNewOp<NEWOP>( \
genericOp, \
ValueRange{genericOp.getDpsInputs()[(OPERANDS_SWAP) ? 1 : 0], \
genericOp.getDpsInputs()[(OPERANDS_SWAP) ? 0 : 1]}, \
ValueRange{genericOp.getDpsInits()[0]}))

Definition at line 32 of file Specialize.cpp.

◆ REPLACE_UNARY_OP

#define REPLACE_UNARY_OP (   NEWOP)
Value:
(rewriter.replaceOpWithNewOp<NEWOP>(genericOp, \
ValueRange{genericOp.getDpsInputs()[0]}, \
ValueRange{genericOp.getDpsInits()[0]}))

Definition at line 39 of file Specialize.cpp.

Function Documentation

◆ areBinOpsSwapped()

static bool areBinOpsSwapped ( GenericOp  genericOp)
static