9 #ifndef MLIR_TRACING_BREAKPOINTMANAGER_H
10 #define MLIR_TRACING_BREAKPOINTMANAGER_H
13 #include "llvm/ADT/MapVector.h"
27 void enable() { enableStatus =
true; }
29 virtual void print(raw_ostream &os)
const = 0;
48 template <
typename Derived>
53 return breakpoint->
getTypeID() == TypeID::get<Derived>();
81 template <
typename Derived>
88 return breakpointManager->
getTypeID() == TypeID::get<Derived>();
This class provides an efficient unique identifier for a specific C++ type.
An action is a specific action that is to be taken by the compiler, that can be toggled and controlle...
This class provides a CRTP wrapper around a base breakpoint class to define a few necessary utility m...
static bool classof(const Breakpoint *breakpoint)
Support isa/dyn_cast functionality for the derived pass class.
CRTP base class for BreakpointManager implementations.
static bool classof(const BreakpointManager *breakpointManager)
Provide classof to allow casting between breakpoint manager types.
A breakpoint manager is responsible for managing a set of breakpoints and matching them to a given ac...
virtual ~BreakpointManager()=default
TypeID getTypeID() const
TypeID for the subclass, used for casting purpose.
BreakpointManager(TypeID typeID)
virtual Breakpoint * match(const Action &action) const =0
Try to match a Breakpoint to a given Action.
This abstract class represents a breakpoint.
Breakpoint(TypeID typeID)
TypeID getTypeID() const
TypeID for the subclass, used for casting purpose.
virtual ~Breakpoint()=default
virtual void print(raw_ostream &os) const =0
raw_ostream & operator<<(raw_ostream &os, const Breakpoint &breakpoint)
Include the generated interface declarations.
auto get(MLIRContext *context, Ts &&...params)
Helper method that injects context only if needed, this helps unify some of the attribute constructio...