When all operands or results are variadic, zero values is a perfectly valid behavior to expect, and we shouldn't force the user to provide values in this case. For example, when creating a call or a return operation we often don't want/need to provide return values. Differential Revision: https://reviews.llvm.org/D133721
19 lines
731 B
Plaintext
19 lines
731 B
Plaintext
//===- 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/Transforms/DialectConversion.pdll"
|
|
|
|
/// Change the result type of a producer.
|
|
Pattern => replace op<test.cast> -> (results: TypeRange)
|
|
with op<test.cast> -> (convertTypes(results));
|
|
|
|
/// Pass through test.return conversion.
|
|
Pattern => replace op<test.return>(args: ValueRange)
|
|
with op<test.return>(convertValues(args));
|