9 #ifndef CIRCT_DIALECT_LTL_LTLVISITORS_H
10 #define CIRCT_DIALECT_LTL_LTLVISITORS_H
13 #include "llvm/ADT/TypeSwitch.h"
17 template <
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, ConcatOp, RepeatOp, NotOp,
25 ImplicationOp, UntilOp, EventuallyOp, ClockOp,
26 IntersectOp, NonConsecutiveRepeatOp, GoToRepeatOp>(
27 [&](
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...); \
63 HANDLE(NonConsecutiveRepeatOp, 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(ImplicationOp, Unhandled)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.