MLIR 22.0.0git
LoopEmitter.cpp File Reference

Go to the source code of this file.

Macros

#define CMPI(p, l, r)
#define C_IDX(v)
#define YIELD(vs)
#define ADDI(lhs, rhs)
#define ANDI(lhs, rhs)
#define SUBI(lhs, rhs)
#define MULI(lhs, rhs)
#define REMUI(lhs, rhs)
#define DIVUI(lhs, rhs)
#define SELECT(c, l, r)

Functions

static 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)

Macro Definition Documentation

◆ ADDI

#define ADDI ( lhs,
rhs )
Value:
(arith::AddIOp::create(builder, loc, (lhs), (rhs)))
lhs

Definition at line 33 of file LoopEmitter.cpp.

Referenced by mlir::sparse_tensor::LoopEmitter::genAffine().

◆ ANDI

#define ANDI ( lhs,
rhs )
Value:
(arith::AndIOp::create(builder, loc, (lhs), (rhs)))

Definition at line 34 of file LoopEmitter.cpp.

Referenced by mlir::sparse_tensor::genCoIteration().

◆ C_IDX

◆ CMPI

#define CMPI ( p,
l,
r )
Value:
(arith::CmpIOp::create(builder, loc, arith::CmpIPredicate::p, (l), (r)) \
.getResult())

Definition at line 27 of file LoopEmitter.cpp.

Referenced by mlir::sparse_tensor::genCoIteration().

◆ DIVUI

#define DIVUI ( lhs,
rhs )
Value:
(arith::DivUIOp::create(builder, loc, (lhs), (rhs)))

Definition at line 38 of file LoopEmitter.cpp.

◆ MULI

#define MULI ( lhs,
rhs )
Value:
(arith::MulIOp::create(builder, loc, (lhs), (rhs)))

Definition at line 36 of file LoopEmitter.cpp.

Referenced by mlir::sparse_tensor::LoopEmitter::genAffine().

◆ REMUI

#define REMUI ( lhs,
rhs )
Value:
(arith::RemUIOp::create(builder, loc, (lhs), (rhs)))

Definition at line 37 of file LoopEmitter.cpp.

◆ SELECT

#define SELECT ( c,
l,
r )
Value:
(arith::SelectOp::create(builder, loc, (c), (l), (r)))

Definition at line 39 of file LoopEmitter.cpp.

Referenced by mlir::sparse_tensor::genCoIteration().

◆ SUBI

#define SUBI ( lhs,
rhs )
Value:
(arith::SubIOp::create(builder, loc, (lhs), (rhs)))

Definition at line 35 of file LoopEmitter.cpp.

◆ YIELD

#define YIELD ( vs)
Value:
(scf::YieldOp::create(builder, loc, (vs)))

Definition at line 32 of file LoopEmitter.cpp.

Referenced by mlir::sparse_tensor::SparseIterator::forwardIf().

Function Documentation

◆ dumpIndexMemRef()

void dumpIndexMemRef ( OpBuilder & builder,
Location loc,
Value memref )
static

◆ genSliceOffset()

◆ genSliceStride()

◆ isIntOrFPZero()

bool isIntOrFPZero ( Attribute attr)
static

Definition at line 76 of file LoopEmitter.cpp.

Referenced by tryFoldTensors().

◆ tryFoldTensors()

◆ unFoldOpIntResult()

Value unFoldOpIntResult ( OpBuilder & builder,
Location loc,
OpFoldResult ofr )
static