LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Builder.h File Reference
#include <mlir-c/IR.h>
#include <mlir-c/Support.h>
Include dependency graph for Builder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEFINE_C_API_STRUCT(name, storage)
 
#define DECLARE_SUFFIX_OP_BUILDER_CREATE_FN(suffix, ...)
 
#define DECLARE_OP_BUILDER_CREATE_FN(...)
 

Typedefs

typedef void(* MlirNotifyOperationInserted) (MlirOperation, void *)
 
typedef void(* MlirNotifyBlockInserted) (MlirBlock, void *)
 

Functions

 DEFINE_C_API_STRUCT (MlirOpBuilder, void)
 
 DEFINE_C_API_STRUCT (MlirOpBuilderListener, void)
 
MLIR_CAPI_EXPORTED void mlirOpBuilderDestroy (MlirOpBuilder builder)
 Destroys the given builder.
 
MLIR_CAPI_EXPORTED MlirContext mlirOpBuilderGetContext (MlirOpBuilder builder)
 Returns the context.
 
MLIR_CAPI_EXPORTED void mlirOpBuilderSetInsertionPointToStart (MlirOpBuilder builder, MlirBlock block)
 Sets the insertion point to the beginning of the given block.
 
MLIR_CAPI_EXPORTED MlirOperation mlirOpBuilderGetInsertionPoint (MlirOpBuilder builder)
 Returns the current insertion point in the builder.
 
MLIR_CAPI_EXPORTED MlirBlock mlirOpBuilderGetInsertionBlock (MlirOpBuilder builder)
 Returns the current insertion block in the builder.
 
MLIR_CAPI_EXPORTED MlirOpBuilderListener mlirOpBuilderListenerCreate (MlirNotifyOperationInserted operationCb, MlirNotifyBlockInserted blockCb, void *userData)
 Creates a new mlir::OpBuilder::Listener.
 
MLIR_CAPI_EXPORTED void mlirOpBuilderListenerDestroy (MlirOpBuilderListener listener)
 Destroys the given listener.
 

Macro Definition Documentation

◆ DECLARE_OP_BUILDER_CREATE_FN

#define DECLARE_OP_BUILDER_CREATE_FN ( ...)
Value:
#define DECLARE_SUFFIX_OP_BUILDER_CREATE_FN(suffix,...)
Definition Builder.h:62

Definition at line 67 of file Builder.h.

◆ DECLARE_SUFFIX_OP_BUILDER_CREATE_FN

#define DECLARE_SUFFIX_OP_BUILDER_CREATE_FN ( suffix,
... )
Value:
MLIR_CAPI_EXPORTED MlirOpBuilder mlirOpBuilderCreate##suffix(__VA_ARGS__); \
MLIR_CAPI_EXPORTED MlirOpBuilder mlirOpBuilderCreate##suffix##WithListener( \
__VA_ARGS__, MlirOpBuilderListener \
);
MlirOpBuilder mlirOpBuilderCreate(MlirContext ctx)
Definition Builder.cpp:47

Definition at line 62 of file Builder.h.

◆ DEFINE_C_API_STRUCT

#define DEFINE_C_API_STRUCT ( name,
storage )
Value:
struct name { \
storage *ptr; \
}; \
typedef struct name name
MlirStringRef name

Definition at line 25 of file Builder.h.

Typedef Documentation

◆ MlirNotifyBlockInserted

typedef void(* MlirNotifyBlockInserted) (MlirBlock, void *)

Definition at line 53 of file Builder.h.

◆ MlirNotifyOperationInserted

typedef void(* MlirNotifyOperationInserted) (MlirOperation, void *)

Definition at line 52 of file Builder.h.

Function Documentation

◆ DEFINE_C_API_STRUCT() [1/2]

DEFINE_C_API_STRUCT ( MlirOpBuilder ,
void  )

◆ DEFINE_C_API_STRUCT() [2/2]

DEFINE_C_API_STRUCT ( MlirOpBuilderListener ,
void  )

◆ mlirOpBuilderDestroy()

MLIR_CAPI_EXPORTED void mlirOpBuilderDestroy ( MlirOpBuilder builder)

Destroys the given builder.

Definition at line 56 of file Builder.cpp.

◆ mlirOpBuilderGetContext()

MLIR_CAPI_EXPORTED MlirContext mlirOpBuilderGetContext ( MlirOpBuilder builder)

Returns the context.

Definition at line 60 of file Builder.cpp.

◆ mlirOpBuilderGetInsertionBlock()

MLIR_CAPI_EXPORTED MlirBlock mlirOpBuilderGetInsertionBlock ( MlirOpBuilder builder)

Returns the current insertion block in the builder.

Definition at line 79 of file Builder.cpp.

◆ mlirOpBuilderGetInsertionPoint()

MLIR_CAPI_EXPORTED MlirOperation mlirOpBuilderGetInsertionPoint ( MlirOpBuilder builder)

Returns the current insertion point in the builder.

Definition at line 68 of file Builder.cpp.

◆ mlirOpBuilderListenerCreate()

MLIR_CAPI_EXPORTED MlirOpBuilderListener mlirOpBuilderListenerCreate ( MlirNotifyOperationInserted operationCb,
MlirNotifyBlockInserted blockCb,
void * userData )

Creates a new mlir::OpBuilder::Listener.

Takes one callback for each method of the Listener interface and a pointer to user defined data.

Definition at line 87 of file Builder.cpp.

◆ mlirOpBuilderListenerDestroy()

MLIR_CAPI_EXPORTED void mlirOpBuilderListenerDestroy ( MlirOpBuilderListener listener)

Destroys the given listener.

Definition at line 93 of file Builder.cpp.

◆ mlirOpBuilderSetInsertionPointToStart()

MLIR_CAPI_EXPORTED void mlirOpBuilderSetInsertionPointToStart ( MlirOpBuilder builder,
MlirBlock block )

Sets the insertion point to the beginning of the given block.

Definition at line 64 of file Builder.cpp.