MLIR  21.0.0git
Functions | Variables
IRDLToCpp.cpp File Reference
#include "mlir/Target/IRDLToCpp/IRDLToCpp.h"
#include "mlir/Dialect/IRDL/IR/IRDL.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#include "TemplatingUtils.h"
#include "Templates/Header.txt"
#include "Templates/TypeDecl.txt"
#include "Templates/PerOperationDecl.txt"
#include "Templates/DialectDecl.txt"
#include "Templates/TypeHeaderDecl.txt"
#include "Templates/PerOperationDef.txt"
#include "Templates/TypeHeaderDef.txt"
#include "Templates/TypeDef.txt"
#include "Templates/DialectDef.txt"

Go to the source code of this file.

Functions

static LogicalResult generateTypeInclude (irdl::TypeOp type, raw_ostream &output, irdl::detail::dictionary &dict)
 
static void generateOpGetterDeclarations (irdl::detail::dictionary &dict, const OpStrings &opStrings)
 
static void generateOpBuilderDeclarations (irdl::detail::dictionary &dict, const OpStrings &opStrings)
 
static LogicalResult generateOperationInclude (irdl::OperationOp op, raw_ostream &output, irdl::detail::dictionary &dict)
 
static LogicalResult generateInclude (irdl::DialectOp dialect, raw_ostream &output, DialectStrings &dialectStrings)
 
static std::string generateOpDefinition (irdl::detail::dictionary &dict, irdl::OperationOp op)
 
static std::string generateTypeVerifierCase (StringRef name, const DialectStrings &dialectStrings)
 
static LogicalResult generateLib (irdl::DialectOp dialect, raw_ostream &output, DialectStrings &dialectStrings)
 
static LogicalResult verifySupported (irdl::DialectOp dialect)
 

Variables

constexpr char headerTemplateText [] =
 
constexpr char declarationMacroFlag [] = "GEN_DIALECT_DECL_HEADER"
 
constexpr char definitionMacroFlag [] = "GEN_DIALECT_DEF"
 

Function Documentation

◆ generateInclude()

static LogicalResult generateInclude ( irdl::DialectOp  dialect,
raw_ostream &  output,
DialectStrings &  dialectStrings 
)
static

Definition at line 247 of file IRDLToCpp.cpp.

References generateOperationInclude(), and generateTypeInclude().

◆ generateLib()

static LogicalResult generateLib ( irdl::DialectOp  dialect,
raw_ostream &  output,
DialectStrings &  dialectStrings 
)
static

Definition at line 355 of file IRDLToCpp.cpp.

◆ generateOpBuilderDeclarations()

static void generateOpBuilderDeclarations ( irdl::detail::dictionary dict,
const OpStrings &  opStrings 
)
static

Definition at line 202 of file IRDLToCpp.cpp.

Referenced by generateOperationInclude().

◆ generateOpDefinition()

static std::string generateOpDefinition ( irdl::detail::dictionary dict,
irdl::OperationOp  op 
)
static

Definition at line 294 of file IRDLToCpp.cpp.

◆ generateOperationInclude()

static LogicalResult generateOperationInclude ( irdl::OperationOp  op,
raw_ostream &  output,
irdl::detail::dictionary dict 
)
static

Definition at line 231 of file IRDLToCpp.cpp.

References generateOpBuilderDeclarations(), and generateOpGetterDeclarations().

Referenced by generateInclude().

◆ generateOpGetterDeclarations()

static void generateOpGetterDeclarations ( irdl::detail::dictionary dict,
const OpStrings &  opStrings 
)
static

Definition at line 178 of file IRDLToCpp.cpp.

Referenced by generateOperationInclude().

◆ generateTypeInclude()

static LogicalResult generateTypeInclude ( irdl::TypeOp  type,
raw_ostream &  output,
irdl::detail::dictionary dict 
)
static

Definition at line 166 of file IRDLToCpp.cpp.

Referenced by generateInclude().

◆ generateTypeVerifierCase()

static std::string generateTypeVerifierCase ( StringRef  name,
const DialectStrings &  dialectStrings 
)
static

Definition at line 349 of file IRDLToCpp.cpp.

◆ verifySupported()

static LogicalResult verifySupported ( irdl::DialectOp  dialect)
static

Definition at line 447 of file IRDLToCpp.cpp.

Variable Documentation

◆ declarationMacroFlag

constexpr char declarationMacroFlag[] = "GEN_DIALECT_DECL_HEADER"
constexpr

Definition at line 28 of file IRDLToCpp.cpp.

◆ definitionMacroFlag

constexpr char definitionMacroFlag[] = "GEN_DIALECT_DEF"
constexpr

Definition at line 29 of file IRDLToCpp.cpp.

◆ headerTemplateText

constexpr char headerTemplateText[] =
constexpr

Definition at line 24 of file IRDLToCpp.cpp.