MLIR  19.0.0git
Macros | Functions
LoopEmitter.cpp File Reference
#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)
 

Macro Definition Documentation

◆ ADDI

#define ADDI (   lhs,
  rhs 
)    (builder.create<arith::AddIOp>(loc, (lhs), (rhs)))

Definition at line 35 of file LoopEmitter.cpp.

◆ ANDI

#define ANDI (   lhs,
  rhs 
)    (builder.create<arith::AndIOp>(loc, (lhs), (rhs)))

Definition at line 36 of file LoopEmitter.cpp.

◆ C_IDX

#define C_IDX (   v)    (constantIndex(builder, loc, (v)))

Definition at line 33 of file LoopEmitter.cpp.

◆ CMPI

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

Definition at line 29 of file LoopEmitter.cpp.

◆ DIVUI

#define DIVUI (   lhs,
  rhs 
)    (builder.create<arith::DivUIOp>(loc, (lhs), (rhs)))

Definition at line 40 of file LoopEmitter.cpp.

◆ MULI

#define MULI (   lhs,
  rhs 
)    (builder.create<arith::MulIOp>(loc, (lhs), (rhs)))

Definition at line 38 of file LoopEmitter.cpp.

◆ REMUI

#define REMUI (   lhs,
  rhs 
)    (builder.create<arith::RemUIOp>(loc, (lhs), (rhs)))

Definition at line 39 of file LoopEmitter.cpp.

◆ SELECT

#define SELECT (   c,
  l,
 
)    (builder.create<arith::SelectOp>(loc, (c), (l), (r)))

Definition at line 41 of file LoopEmitter.cpp.

◆ SUBI

#define SUBI (   lhs,
  rhs 
)    (builder.create<arith::SubIOp>(loc, (lhs), (rhs)))

Definition at line 37 of file LoopEmitter.cpp.

◆ YIELD

#define YIELD (   vs)    (builder.create<scf::YieldOp>(loc, (vs)))

Definition at line 34 of file LoopEmitter.cpp.

Function Documentation

◆ dumpIndexMemRef()

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

◆ genSliceOffset()

static Value genSliceOffset ( OpBuilder builder,
Location  loc,
Value  tensor,
Level  lvl 
)
static

◆ genSliceStride()

static Value genSliceStride ( OpBuilder builder,
Location  loc,
Value  tensor,
Level  lvl 
)
static

◆ isIntOrFPZero()

static bool isIntOrFPZero ( Attribute  attr)
static

Definition at line 78 of file LoopEmitter.cpp.

Referenced by tryFoldTensors().

◆ tryFoldTensors()

static Value tryFoldTensors ( Value  t)
static

◆ unFoldOpIntResult()

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