9#ifndef CIRCT_DIALECT_LTL_LTLVISITORS_H
10#define CIRCT_DIALECT_LTL_LTLVISITORS_H
13#include "llvm/ADT/TypeSwitch.h"
17template <
typename ConcreteType,
typename ResultType = void,
18 typename... ExtraArgs>
22 auto *thisCast =
static_cast<ConcreteType *
>(
this);
23 return TypeSwitch<Operation *, ResultType>(op)
24 .template Case<AndOp, OrOp, DelayOp, ClockedDelayOp, ConcatOp, RepeatOp,
25 NotOp, ImplicationOp, UntilOp, EventuallyOp, ClockOp,
26 IntersectOp, NonConsecutiveRepeatOp, GoToRepeatOp,
27 BooleanConstantOp>([&](
auto op) -> ResultType {
28 return thisCast->visitLTL(op, args...);
30 .Default([&](
auto) -> ResultType {
31 return thisCast->visitInvalidLTL(op, args...);
37 op->emitOpError(
"is not an LTL operation");
47#define HANDLE(OPTYPE, OPKIND) \
48 ResultType visitLTL(OPTYPE op, ExtraArgs... args) { \
49 return static_cast<ConcreteType *>(this)->visit##OPKIND##LTL(op, args...); \
64 HANDLE(NonConsecutiveRepeatOp, Unhandled);
66 HANDLE(BooleanConstantOp, Unhandled);
HANDLE(UntilOp, Unhandled)
ResultType visitInvalidLTL(Operation *op, ExtraArgs... args)
This callback is invoked on any non-LTL operations.
HANDLE(GoToRepeatOp, Unhandled)
HANDLE(DelayOp, Unhandled)
HANDLE(EventuallyOp, Unhandled)
ResultType dispatchLTLVisitor(Operation *op, ExtraArgs... args)
HANDLE(ClockOp, Unhandled)
HANDLE(RepeatOp, Unhandled)
HANDLE(NonConsecutiveRepeatOp, Unhandled)
HANDLE(ConcatOp, Unhandled)
HANDLE(IntersectOp, Unhandled)
ResultType visitUnhandledLTL(Operation *op, ExtraArgs... args)
This callback is invoked on any LTL operations that were not handled by their concrete visitLTL(....
HANDLE(ClockedDelayOp, Unhandled)
HANDLE(BooleanConstantOp, Unhandled)
HANDLE(ImplicationOp, Unhandled)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.