#include "mlir/Conversion/MemRefToEmitC/MemRefToEmitC.h"
#include "mlir/Dialect/EmitC/IR/EmitC.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Transforms/DialectConversion.h"
usingnamespacemlir;
namespace {
struct ConvertAlloca final : public OpConversionPattern<memref::AllocaOp> { … };
struct ConvertGlobal final : public OpConversionPattern<memref::GlobalOp> { … };
struct ConvertGetGlobal final
: public OpConversionPattern<memref::GetGlobalOp> { … };
struct ConvertLoad final : public OpConversionPattern<memref::LoadOp> { … };
struct ConvertStore final : public OpConversionPattern<memref::StoreOp> { … };
}
void mlir::populateMemRefToEmitCTypeConversion(TypeConverter &typeConverter) { … }
void mlir::populateMemRefToEmitCConversionPatterns(
RewritePatternSet &patterns, const TypeConverter &converter) { … }