#include "mlir-c/Rewrite.h"
#include "mlir-c/Transforms.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Rewrite.h"
#include "mlir/CAPI/Support.h"
#include "mlir/CAPI/Wrap.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Rewrite/FrozenRewritePatternSet.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
usingnamespacemlir;
MlirContext mlirRewriterBaseGetContext(MlirRewriterBase rewriter) { … }
void mlirRewriterBaseClearInsertionPoint(MlirRewriterBase rewriter) { … }
void mlirRewriterBaseSetInsertionPointBefore(MlirRewriterBase rewriter,
MlirOperation op) { … }
void mlirRewriterBaseSetInsertionPointAfter(MlirRewriterBase rewriter,
MlirOperation op) { … }
void mlirRewriterBaseSetInsertionPointAfterValue(MlirRewriterBase rewriter,
MlirValue value) { … }
void mlirRewriterBaseSetInsertionPointToStart(MlirRewriterBase rewriter,
MlirBlock block) { … }
void mlirRewriterBaseSetInsertionPointToEnd(MlirRewriterBase rewriter,
MlirBlock block) { … }
MlirBlock mlirRewriterBaseGetInsertionBlock(MlirRewriterBase rewriter) { … }
MlirBlock mlirRewriterBaseGetBlock(MlirRewriterBase rewriter) { … }
MlirBlock mlirRewriterBaseCreateBlockBefore(MlirRewriterBase rewriter,
MlirBlock insertBefore,
intptr_t nArgTypes,
MlirType const *argTypes,
MlirLocation const *locations) { … }
MlirOperation mlirRewriterBaseInsert(MlirRewriterBase rewriter,
MlirOperation op) { … }
MlirOperation mlirRewriterBaseClone(MlirRewriterBase rewriter,
MlirOperation op) { … }
MlirOperation mlirRewriterBaseCloneWithoutRegions(MlirRewriterBase rewriter,
MlirOperation op) { … }
void mlirRewriterBaseCloneRegionBefore(MlirRewriterBase rewriter,
MlirRegion region, MlirBlock before) { … }
void mlirRewriterBaseInlineRegionBefore(MlirRewriterBase rewriter,
MlirRegion region, MlirBlock before) { … }
void mlirRewriterBaseReplaceOpWithValues(MlirRewriterBase rewriter,
MlirOperation op, intptr_t nValues,
MlirValue const *values) { … }
void mlirRewriterBaseReplaceOpWithOperation(MlirRewriterBase rewriter,
MlirOperation op,
MlirOperation newOp) { … }
void mlirRewriterBaseEraseOp(MlirRewriterBase rewriter, MlirOperation op) { … }
void mlirRewriterBaseEraseBlock(MlirRewriterBase rewriter, MlirBlock block) { … }
void mlirRewriterBaseInlineBlockBefore(MlirRewriterBase rewriter,
MlirBlock source, MlirOperation op,
intptr_t nArgValues,
MlirValue const *argValues) { … }
void mlirRewriterBaseMergeBlocks(MlirRewriterBase rewriter, MlirBlock source,
MlirBlock dest, intptr_t nArgValues,
MlirValue const *argValues) { … }
void mlirRewriterBaseMoveOpBefore(MlirRewriterBase rewriter, MlirOperation op,
MlirOperation existingOp) { … }
void mlirRewriterBaseMoveOpAfter(MlirRewriterBase rewriter, MlirOperation op,
MlirOperation existingOp) { … }
void mlirRewriterBaseMoveBlockBefore(MlirRewriterBase rewriter, MlirBlock block,
MlirBlock existingBlock) { … }
void mlirRewriterBaseStartOpModification(MlirRewriterBase rewriter,
MlirOperation op) { … }
void mlirRewriterBaseFinalizeOpModification(MlirRewriterBase rewriter,
MlirOperation op) { … }
void mlirRewriterBaseCancelOpModification(MlirRewriterBase rewriter,
MlirOperation op) { … }
void mlirRewriterBaseReplaceAllUsesWith(MlirRewriterBase rewriter,
MlirValue from, MlirValue to) { … }
void mlirRewriterBaseReplaceAllValueRangeUsesWith(MlirRewriterBase rewriter,
intptr_t nValues,
MlirValue const *from,
MlirValue const *to) { … }
void mlirRewriterBaseReplaceAllOpUsesWithValueRange(MlirRewriterBase rewriter,
MlirOperation from,
intptr_t nTo,
MlirValue const *to) { … }
void mlirRewriterBaseReplaceAllOpUsesWithOperation(MlirRewriterBase rewriter,
MlirOperation from,
MlirOperation to) { … }
void mlirRewriterBaseReplaceOpUsesWithinBlock(MlirRewriterBase rewriter,
MlirOperation op,
intptr_t nNewValues,
MlirValue const *newValues,
MlirBlock block) { … }
void mlirRewriterBaseReplaceAllUsesExcept(MlirRewriterBase rewriter,
MlirValue from, MlirValue to,
MlirOperation exceptedUser) { … }
MlirRewriterBase mlirIRRewriterCreate(MlirContext context) { … }
MlirRewriterBase mlirIRRewriterCreateFromOp(MlirOperation op) { … }
void mlirIRRewriterDestroy(MlirRewriterBase rewriter) { … }
inline mlir::RewritePatternSet &unwrap(MlirRewritePatternSet module) { … }
inline MlirRewritePatternSet wrap(mlir::RewritePatternSet *module) { … }
inline mlir::FrozenRewritePatternSet *
unwrap(MlirFrozenRewritePatternSet module) { … }
inline MlirFrozenRewritePatternSet wrap(mlir::FrozenRewritePatternSet *module) { … }
MlirFrozenRewritePatternSet mlirFreezeRewritePattern(MlirRewritePatternSet op) { … }
void mlirFrozenRewritePatternSetDestroy(MlirFrozenRewritePatternSet op) { … }
MlirLogicalResult
mlirApplyPatternsAndFoldGreedily(MlirModule op,
MlirFrozenRewritePatternSet patterns,
MlirGreedyRewriteDriverConfig) { … }
#if MLIR_ENABLE_PDL_IN_PATTERNMATCH
inline mlir::PDLPatternModule *unwrap(MlirPDLPatternModule module) { … }
inline MlirPDLPatternModule wrap(mlir::PDLPatternModule *module) { … }
MlirPDLPatternModule mlirPDLPatternModuleFromModule(MlirModule op) { … }
void mlirPDLPatternModuleDestroy(MlirPDLPatternModule op) { … }
MlirRewritePatternSet
mlirRewritePatternSetFromPDLPatternModule(MlirPDLPatternModule op) { … }
#endif