CIRCT 23.0.0git
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
FlattenMemRefs.cpp File Reference
#include "circt/Support/LLVM.h"
#include "circt/Transforms/Passes.h"
#include "mlir/Conversion/LLVMCommon/ConversionTarget.h"
#include "mlir/Conversion/LLVMCommon/Pattern.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/Dialect/ControlFlow/Transforms/StructuralTypeConversions.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/Utils/ReshapeOpsUtils.h"
#include "mlir/IR/BuiltinDialect.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/LogicalResult.h"
#include "llvm/Support/MathExtras.h"
#include "circt/Transforms/Passes.h.inc"
Include dependency graph for FlattenMemRefs.cpp:

Go to the source code of this file.

Classes

struct  FunctionRewrite
 A struct for maintaining function declarations which needs to be rewritten, if they contain memref arguments that was flattened. More...
 
struct  FlattenMemRefsState
 

Namespaces

namespace  circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
 

Macros

#define GEN_PASS_DEF_FLATTENMEMREF
 
#define GEN_PASS_DEF_FLATTENMEMREFCALLS
 

Functions

static MemRefType getFlattenedMemRefType (MemRefType type)
 
static std::string getFlattenedMemRefName (FlattenMemRefsState &state, StringAttr baseName, MemRefType type)
 
static Value flattenIndices (ConversionPatternRewriter &rewriter, Operation *op, ValueRange indices, MemRefType memrefType)
 
static bool hasMultiDimMemRef (ValueRange values)
 
std::unique_ptr< mlir::Pass > circt::createFlattenMemRefPass ()
 
std::unique_ptr< mlir::Pass > circt::createFlattenMemRefCallsPass ()
 

Macro Definition Documentation

◆ GEN_PASS_DEF_FLATTENMEMREF

#define GEN_PASS_DEF_FLATTENMEMREF

Definition at line 35 of file FlattenMemRefs.cpp.

◆ GEN_PASS_DEF_FLATTENMEMREFCALLS

#define GEN_PASS_DEF_FLATTENMEMREFCALLS

Definition at line 36 of file FlattenMemRefs.cpp.

Function Documentation

◆ flattenIndices()

static Value flattenIndices ( ConversionPatternRewriter &  rewriter,
Operation *  op,
ValueRange  indices,
MemRefType  memrefType 
)
static

Definition at line 74 of file FlattenMemRefs.cpp.

References assert().

◆ getFlattenedMemRefName()

static std::string getFlattenedMemRefName ( FlattenMemRefsState state,
StringAttr  baseName,
MemRefType  type 
)
static

Definition at line 64 of file FlattenMemRefs.cpp.

References FlattenMemRefsState::counter.

◆ getFlattenedMemRefType()

static MemRefType getFlattenedMemRefType ( MemRefType  type)
static

Definition at line 59 of file FlattenMemRefs.cpp.

◆ hasMultiDimMemRef()

static bool hasMultiDimMemRef ( ValueRange  values)
static

Definition at line 120 of file FlattenMemRefs.cpp.

References circt::isUniDimensional().