9 #ifndef CIRCT_DIALECT_VERIF_VERIFVISITORS_H
10 #define CIRCT_DIALECT_VERIF_VERIFVISITORS_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<AssertOp, AssumeOp, CoverOp, ClockedAssertOp,
25 ClockedAssumeOp, ClockedCoverOp>(
26 [&](
auto op) -> ResultType {
27 return thisCast->visitVerif(op, args...);
29 .Default([&](
auto) -> ResultType {
30 return thisCast->visitInvalidVerif(op, args...);
36 op->emitOpError(
"is not a verif operation");
46 #define HANDLE(OPTYPE, OPKIND) \
47 ResultType visitVerif(OPTYPE op, ExtraArgs... args) { \
48 return static_cast<ConcreteType *>(this)->visit##OPKIND##Verif(op, \
ResultType dispatchVerifVisitor(Operation *op, ExtraArgs... args)
HANDLE(ClockedAssertOp, Unhandled)
HANDLE(ClockedAssumeOp, Unhandled)
HANDLE(AssertOp, Unhandled)
HANDLE(CoverOp, Unhandled)
HANDLE(AssumeOp, Unhandled)
HANDLE(ClockedCoverOp, Unhandled)
ResultType visitInvalidVerif(Operation *op, ExtraArgs... args)
This callback is invoked on any non-verif operations.
ResultType visitUnhandledVerif(Operation *op, ExtraArgs... args)
This callback is invoked on any verif operations that were not handled by their concrete visitVerif(....
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.