MLIR
20.0.0git
|
#include "LoopEmitter.h"
#include "CodegenUtils.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorType.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
Go to the source code of this file.
Macros | |
#define | CMPI(p, l, r) |
#define | C_IDX(v) (constantIndex(builder, loc, (v))) |
#define | YIELD(vs) (builder.create<scf::YieldOp>(loc, (vs))) |
#define | ADDI(lhs, rhs) (builder.create<arith::AddIOp>(loc, (lhs), (rhs))) |
#define | ANDI(lhs, rhs) (builder.create<arith::AndIOp>(loc, (lhs), (rhs))) |
#define | SUBI(lhs, rhs) (builder.create<arith::SubIOp>(loc, (lhs), (rhs))) |
#define | MULI(lhs, rhs) (builder.create<arith::MulIOp>(loc, (lhs), (rhs))) |
#define | REMUI(lhs, rhs) (builder.create<arith::RemUIOp>(loc, (lhs), (rhs))) |
#define | DIVUI(lhs, rhs) (builder.create<arith::DivUIOp>(loc, (lhs), (rhs))) |
#define | SELECT(c, l, r) (builder.create<arith::SelectOp>(loc, (c), (l), (r))) |
Functions | |
static LLVM_ATTRIBUTE_UNUSED void | dumpIndexMemRef (OpBuilder &builder, Location loc, Value memref) |
static Value | genSliceOffset (OpBuilder &builder, Location loc, Value tensor, Level lvl) |
static Value | genSliceStride (OpBuilder &builder, Location loc, Value tensor, Level lvl) |
static bool | isIntOrFPZero (Attribute attr) |
static Value | unFoldOpIntResult (OpBuilder &builder, Location loc, OpFoldResult ofr) |
static Value | tryFoldTensors (Value t) |
#define ADDI | ( | lhs, | |
rhs | |||
) | (builder.create<arith::AddIOp>(loc, (lhs), (rhs))) |
Definition at line 35 of file LoopEmitter.cpp.
#define ANDI | ( | lhs, | |
rhs | |||
) | (builder.create<arith::AndIOp>(loc, (lhs), (rhs))) |
Definition at line 36 of file LoopEmitter.cpp.
#define C_IDX | ( | v | ) | (constantIndex(builder, loc, (v))) |
Definition at line 33 of file LoopEmitter.cpp.
#define CMPI | ( | p, | |
l, | |||
r | |||
) |
Definition at line 29 of file LoopEmitter.cpp.
#define DIVUI | ( | lhs, | |
rhs | |||
) | (builder.create<arith::DivUIOp>(loc, (lhs), (rhs))) |
Definition at line 40 of file LoopEmitter.cpp.
#define MULI | ( | lhs, | |
rhs | |||
) | (builder.create<arith::MulIOp>(loc, (lhs), (rhs))) |
Definition at line 38 of file LoopEmitter.cpp.
#define REMUI | ( | lhs, | |
rhs | |||
) | (builder.create<arith::RemUIOp>(loc, (lhs), (rhs))) |
Definition at line 39 of file LoopEmitter.cpp.
#define SELECT | ( | c, | |
l, | |||
r | |||
) | (builder.create<arith::SelectOp>(loc, (c), (l), (r))) |
Definition at line 41 of file LoopEmitter.cpp.
#define SUBI | ( | lhs, | |
rhs | |||
) | (builder.create<arith::SubIOp>(loc, (lhs), (rhs))) |
Definition at line 37 of file LoopEmitter.cpp.
#define YIELD | ( | vs | ) | (builder.create<scf::YieldOp>(loc, (vs))) |
Definition at line 34 of file LoopEmitter.cpp.
|
static |
Definition at line 48 of file LoopEmitter.cpp.
References mlir::OpBuilder::create(), mlir::sparse_tensor::createFuncCall(), mlir::get(), mlir::Builder::getIndexType(), and mlir::sparse_tensor::On.
Definition at line 66 of file LoopEmitter.cpp.
References mlir::sparse_tensor::createOrFoldSliceOffsetOp(), mlir::sparse_tensor::getSparseTensorEncoding(), mlir::Value::getType(), and mlir::sparse_tensor::toDim().
Definition at line 72 of file LoopEmitter.cpp.
References mlir::sparse_tensor::createOrFoldSliceStrideOp(), mlir::sparse_tensor::getSparseTensorEncoding(), mlir::Value::getType(), and mlir::sparse_tensor::toDim().
|
static |
Definition at line 78 of file LoopEmitter.cpp.
Referenced by tryFoldTensors().
Definition at line 93 of file LoopEmitter.cpp.
References mlir::Value::getDefiningOp(), isIntOrFPZero(), mlir::m_Constant(), mlir::matchPattern(), and mlir::sparse_tensor::tryGetSparseTensorType().
Referenced by mlir::sparse_tensor::LoopEmitter::initializeLoopEmit().
|
static |
Definition at line 86 of file LoopEmitter.cpp.
References mlir::sparse_tensor::constantIndex(), and mlir::getConstantIntValue().