MLIR 22.0.0git
DecomposeMemRefs.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::impl::GpuDecomposeMemrefsPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::impl
 Attribute collections provide a dictionary-like interface.

Macros

#define GEN_PASS_DEF_GPUDECOMPOSEMEMREFSPASS

Functions

std::unique_ptr<::mlir::Passmlir::impl::createGpuDecomposeMemrefsPass ()
std::unique_ptr<::mlir::Passmlir::createGpuDecomposeMemrefsPass ()
static MemRefType inferCastResultType (Value source, OpFoldResult offset)
static void setInsertionPointToStart (OpBuilder &builder, Value val)
static bool isInsideLaunch (Operation *op)
static std::tuple< Value, OpFoldResult, SmallVector< OpFoldResult > > getFlatOffsetAndStrides (OpBuilder &rewriter, Location loc, Value source, ArrayRef< OpFoldResult > subOffsets, ArrayRef< OpFoldResult > subStrides={})
static Value getFlatMemref (OpBuilder &rewriter, Location loc, Value source, ValueRange offsets)
static bool needFlatten (Value val)
static bool checkLayout (Value val)

Macro Definition Documentation

◆ GEN_PASS_DEF_GPUDECOMPOSEMEMREFSPASS

#define GEN_PASS_DEF_GPUDECOMPOSEMEMREFSPASS

Definition at line 24 of file DecomposeMemRefs.cpp.

Function Documentation

◆ checkLayout()

bool checkLayout ( Value val)
static

Definition at line 121 of file DecomposeMemRefs.cpp.

◆ getFlatMemref()

Value getFlatMemref ( OpBuilder & rewriter,
Location loc,
Value source,
ValueRange offsets )
static

Definition at line 105 of file DecomposeMemRefs.cpp.

References mlir::getAsOpFoldResult(), and getFlatOffsetAndStrides().

◆ getFlatOffsetAndStrides()

std::tuple< Value, OpFoldResult, SmallVector< OpFoldResult > > getFlatOffsetAndStrides ( OpBuilder & rewriter,
Location loc,
Value source,
ArrayRef< OpFoldResult > subOffsets,
ArrayRef< OpFoldResult > subStrides = {} )
static

Definition at line 54 of file DecomposeMemRefs.cpp.

Referenced by getFlatMemref().

◆ inferCastResultType()

MemRefType inferCastResultType ( Value source,
OpFoldResult offset )
static

◆ isInsideLaunch()

bool isInsideLaunch ( Operation * op)
static

Definition at line 49 of file DecomposeMemRefs.cpp.

References mlir::Operation::getParentOfType().

◆ needFlatten()

bool needFlatten ( Value val)
static

Definition at line 116 of file DecomposeMemRefs.cpp.

◆ setInsertionPointToStart()