#include "mlir/Dialect/PDLInterp/IR/PDLInterp.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
usingnamespacemlir;
static LogicalResult customSingleEntityConstraint(PatternRewriter &rewriter,
Operation *rootOp) { … }
static LogicalResult customMultiEntityConstraint(PatternRewriter &rewriter,
Operation *root,
Operation *rootCopy) { … }
static LogicalResult customMultiEntityVariadicConstraint(
PatternRewriter &rewriter, ValueRange operandValues, TypeRange typeValues) { … }
static LogicalResult customValueResultConstraint(PatternRewriter &rewriter,
PDLResultList &results,
ArrayRef<PDLValue> args) { … }
static LogicalResult customTypeResultConstraint(PatternRewriter &rewriter,
PDLResultList &results,
ArrayRef<PDLValue> args) { … }
static LogicalResult customTypeRangeResultConstraint(PatternRewriter &rewriter,
PDLResultList &results,
ArrayRef<PDLValue> args) { … }
static Operation *customCreate(PatternRewriter &rewriter, Operation *op) { … }
static auto customVariadicResultCreate(PatternRewriter &rewriter,
Operation *root) { … }
static Type customCreateType(PatternRewriter &rewriter) { … }
static std::string customCreateStrAttr(PatternRewriter &rewriter) { … }
static void customRewriter(PatternRewriter &rewriter, Operation *root,
Value input) { … }
namespace {
struct TestPDLByteCodePass
: public PassWrapper<TestPDLByteCodePass, OperationPass<ModuleOp>> { … };
}
namespace mlir {
namespace test {
void registerTestPDLByteCodePass() { … }
}
}