LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Polymorphic.cpp File Reference
#include "llzk/CAPI/Builder.h"
#include "llzk/CAPI/Support.h"
#include "llzk/Dialect/Polymorphic/IR/Dialect.h"
#include "llzk/Dialect/Polymorphic/IR/Ops.h"
#include "llzk/Dialect/Polymorphic/IR/Types.h"
#include "llzk/Dialect/Polymorphic/Transforms/TransformationPasses.h"
#include "llzk-c/Dialect/Polymorphic.h"
#include <mlir/CAPI/AffineExpr.h>
#include <mlir/CAPI/AffineMap.h>
#include <mlir/CAPI/Pass.h>
#include <mlir/CAPI/Registration.h>
#include <mlir/CAPI/Wrap.h>
#include <mlir/IR/BuiltinAttributes.h>
#include <mlir/Support/LLVM.h>
#include <mlir-c/Pass.h>
#include "llzk/Dialect/Polymorphic/Transforms/TransformationPasses.capi.cpp.inc"
Include dependency graph for Polymorphic.cpp:

Go to the source code of this file.

Functions

 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION (Polymorphic, llzk__polymorphic, llzk::polymorphic::PolymorphicDialect) MlirType llzkTypeVarTypeGet(MlirContext ctx
 
bool llzkTypeIsATypeVarType (MlirType type)
 
MlirType llzkTypeVarTypeGetFromAttr (MlirContext ctx, MlirAttribute attrWrapper)
 Creates a llzk::polymorphic::TypeVarType from either a StringAttr or a FlatSymbolRefAttr.
 
MlirStringRef llzkTypeVarTypeGetNameRef (MlirType type)
 Returns the var name of the TypeVarType as a StringRef.
 
MlirAttribute llzkTypeVarTypeGetName (MlirType type)
 Returns the var name of the TypeVarType as a FlatSymbolRefAttr.
 
 LLZK_DEFINE_OP_BUILD_METHOD (ApplyMapOp, MlirAttribute map, MlirValueRange mapOperands)
 
 LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (ApplyMapOp, WithAffineMap, MlirAffineMap map, MlirValueRange mapOperands)
 
 LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (ApplyMapOp, WithAffineExpr, MlirAffineExpr expr, MlirValueRange mapOperands)
 
bool llzkOperationIsAApplyMapOp (MlirOperation op)
 
MlirAffineMap llzkApplyMapOpGetAffineMap (MlirOperation op)
 Returns the affine map associated with the op.
 
intptr_t llzkApplyMapOpGetNumDimOperands (MlirOperation op)
 Returns the number of operands that correspond to dimensions in the affine map.
 
void llzkApplyMapOpGetDimOperands (MlirOperation op, MlirValue *dst)
 Writes into the destination buffer the operands that correspond to dimensions in the affine map.
 
intptr_t llzkApplyMapOpGetNumSymbolOperands (MlirOperation op)
 Returns the number of operands that correspond to symbols in the affine map.
 
void llzkApplyMapOpGetSymbolOperands (MlirOperation op, MlirValue *dst)
 Writes into the destination buffer the operands that correspond to symbols in the affine map.
 

Variables

MlirStringRef name
 

Function Documentation

◆ LLZK_DEFINE_OP_BUILD_METHOD()

LLZK_DEFINE_OP_BUILD_METHOD ( ApplyMapOp ,
MlirAttribute map,
MlirValueRange mapOperands )

Definition at line 74 of file Polymorphic.cpp.

◆ LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD() [1/2]

LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD ( ApplyMapOp ,
WithAffineExpr ,
MlirAffineExpr expr,
MlirValueRange mapOperands )

Definition at line 92 of file Polymorphic.cpp.

◆ LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD() [2/2]

LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD ( ApplyMapOp ,
WithAffineMap ,
MlirAffineMap map,
MlirValueRange mapOperands )

Definition at line 82 of file Polymorphic.cpp.

◆ llzkApplyMapOpGetAffineMap()

MlirAffineMap llzkApplyMapOpGetAffineMap ( MlirOperation op)

Returns the affine map associated with the op.

Definition at line 105 of file Polymorphic.cpp.

◆ llzkApplyMapOpGetDimOperands()

void llzkApplyMapOpGetDimOperands ( MlirOperation op,
MlirValue * dst )

Writes into the destination buffer the operands that correspond to dimensions in the affine map.

The buffer needs to be preallocated first with the necessary amount and the caller is responsible of its lifetime. See llzkApplyMapOpGetNumDimOperands.

Definition at line 131 of file Polymorphic.cpp.

◆ llzkApplyMapOpGetNumDimOperands()

intptr_t llzkApplyMapOpGetNumDimOperands ( MlirOperation op)

Returns the number of operands that correspond to dimensions in the affine map.

Definition at line 124 of file Polymorphic.cpp.

◆ llzkApplyMapOpGetNumSymbolOperands()

intptr_t llzkApplyMapOpGetNumSymbolOperands ( MlirOperation op)

Returns the number of operands that correspond to symbols in the affine map.

Definition at line 136 of file Polymorphic.cpp.

◆ llzkApplyMapOpGetSymbolOperands()

void llzkApplyMapOpGetSymbolOperands ( MlirOperation op,
MlirValue * dst )

Writes into the destination buffer the operands that correspond to symbols in the affine map.

The buffer needs to be preallocated first with the necessary amount and the caller is responsible of its lifetime. See llzkApplyMapOpGetNumSymbolOperands.

Definition at line 143 of file Polymorphic.cpp.

◆ llzkOperationIsAApplyMapOp()

bool llzkOperationIsAApplyMapOp ( MlirOperation op)

Definition at line 102 of file Polymorphic.cpp.

◆ llzkTypeIsATypeVarType()

bool llzkTypeIsATypeVarType ( MlirType type)

Definition at line 52 of file Polymorphic.cpp.

◆ llzkTypeVarTypeGetFromAttr()

MlirType llzkTypeVarTypeGetFromAttr ( MlirContext ctx,
MlirAttribute attrWrapper )

Creates a llzk::polymorphic::TypeVarType from either a StringAttr or a FlatSymbolRefAttr.

Definition at line 54 of file Polymorphic.cpp.

◆ llzkTypeVarTypeGetName()

MlirAttribute llzkTypeVarTypeGetName ( MlirType type)

Returns the var name of the TypeVarType as a FlatSymbolRefAttr.

Definition at line 66 of file Polymorphic.cpp.

◆ llzkTypeVarTypeGetNameRef()

MlirStringRef llzkTypeVarTypeGetNameRef ( MlirType type)

Returns the var name of the TypeVarType as a StringRef.

Definition at line 62 of file Polymorphic.cpp.

◆ MLIR_DEFINE_CAPI_DIALECT_REGISTRATION()

MLIR_DEFINE_CAPI_DIALECT_REGISTRATION ( Polymorphic ,
llzk__polymorphic ,
llzk::polymorphic::PolymorphicDialect  )

Variable Documentation

◆ name

MlirStringRef name
Initial value:
{
return wrap(TypeVarType::get(FlatSymbolRefAttr::get(StringAttr::get(unwrap(ctx), unwrap(name)))))
MlirStringRef name
static TypeVarType get(::mlir::MLIRContext *context, ::mlir::FlatSymbolRefAttr nameRef)
Definition Types.cpp.inc:67

Definition at line 48 of file Polymorphic.cpp.