//===- TestPDLL.pdll - Test PDLL functionality ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "TestOps.td" #include "mlir/Interfaces/CastInterfaces.td" Constraint TestConstraintWithNamedOpOperand(testOp: Op) [{ return success(); }]; /// A simple pattern that matches and replaces an operation. Pattern TestSimplePattern => replace op with op; // Test the import of interfaces. Pattern TestInterface => replace _: CastOpInterface with op; // Test application of constraint. Pattern { let op = op(input: Value); TestConstraintWithNamedOpOperand(op); replace op with op; }