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, NotOp, ImplicationOp,
25 EventuallyOp, ClockOp, DisableOp>(
26 [&](
auto op) -> ResultType {
27 return thisCast->visitLTL(op, args...);
29 .Default([&](
auto) -> ResultType {
30 return thisCast->visitInvalidLTL(op, args...);
36 op->emitOpError(
"is not an LTL operation");
46 #define HANDLE(OPTYPE, OPKIND) \
47 ResultType visitLTL(OPTYPE op, ExtraArgs... args) { \
48 return static_cast<ConcreteType *>(this)->visit##OPKIND##LTL(op, args...); \
ResultType visitInvalidLTL(Operation *op, ExtraArgs... args)
This callback is invoked on any non-LTL operations.
HANDLE(DelayOp, Unhandled)
HANDLE(EventuallyOp, Unhandled)
ResultType dispatchLTLVisitor(Operation *op, ExtraArgs... args)
HANDLE(ClockOp, Unhandled)
HANDLE(ConcatOp, Unhandled)
HANDLE(DisableOp, 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.