11#include "mlir/IR/Builders.h"
12#include "mlir/IR/OpImplementation.h"
13#include "mlir/IR/PatternMatch.h"
14#include "mlir/IR/SymbolTable.h"
15#include "mlir/Interfaces/FunctionImplementation.h"
16#include "mlir/Interfaces/SideEffectInterfaces.h"
23#include "circt/Dialect/LTL/LTL.cpp.inc"
31 SmallVectorImpl<Type> &results) {
32 if (llvm::any_of(operands, [](
auto operand) {
33 return isa<PropertyType>(operand.getType());
35 results.push_back(PropertyType::get(context));
36 }
else if (llvm::any_of(operands, [](
auto operand) {
37 return isa<SequenceType>(operand.getType());
39 results.push_back(SequenceType::get(context));
41 results.push_back(IntegerType::get(context, 1));
47AndOp::inferReturnTypes(MLIRContext *context, std::optional<Location> loc,
48 ValueRange operands, DictionaryAttr attributes,
49 OpaqueProperties properties, RegionRange regions,
50 SmallVectorImpl<Type> &inferredReturnTypes) {
55OrOp::inferReturnTypes(MLIRContext *context, std::optional<Location> loc,
56 ValueRange operands, DictionaryAttr attributes,
57 OpaqueProperties properties, RegionRange regions,
58 SmallVectorImpl<Type> &inferredReturnTypes) {
63IntersectOp::inferReturnTypes(MLIRContext *context, std::optional<Location> loc,
64 ValueRange operands, DictionaryAttr attributes,
65 OpaqueProperties properties, RegionRange regions,
66 SmallVectorImpl<Type> &inferredReturnTypes) {
75ClockOp::inferReturnTypes(MLIRContext *context, std::optional<Location> loc,
76 ValueRange operands, DictionaryAttr attributes,
77 OpaqueProperties properties, RegionRange regions,
78 SmallVectorImpl<Type> &inferredReturnTypes) {
79 if (isa<PropertyType>(operands[0].getType())) {
80 inferredReturnTypes.push_back(PropertyType::get(context));
82 inferredReturnTypes.push_back(SequenceType::get(context));
static LogicalResult inferAndLikeReturnTypes(MLIRContext *context, ValueRange operands, SmallVectorImpl< Type > &results)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.