9 #ifndef MLIR_DEBUG_CLOPTIONSSETUP_H
10 #define MLIR_DEBUG_CLOPTIONSSETUP_H
13 #include "llvm/ADT/StringRef.h"
20 class BreakpointManager;
92 std::unique_ptr<Impl>
impl;
MLIRContext is the top-level object for a collection of MLIR operations.
A breakpoint manager is responsible for managing a set of breakpoints and matching them to a given ac...
bool enableDebuggerActionHookFlag
Enable the Debugger action hook: a debugger (like gdb or lldb) can intercept MLIR Actions.
std::string logActionsToFlag
Log action execution to the given file (or "-" for stdout)
std::string profileActionsToFlag
Profile action execution to the given file (or "-" for stdout)
static DebugConfig createFromCLOptions()
Create a new config with the default set from the CL options.
StringRef getLogActionsTo() const
Get the filename to use for logging actions.
StringRef getProfileActionsTo() const
Get the filename to use for profiling actions.
void addLogActionLocFilter(tracing::BreakpointManager *breakpointManager)
Set a location breakpoint manager to filter out action logging based on the attached IR location in t...
static void registerCLOptions()
Register the options as global LLVM command line options.
bool isDebuggerActionHookEnabled() const
Return true if the debugger action hook is enabled.
DebugConfig & logActionsTo(StringRef filename)
Set the filename to use for logging actions, use "-" for stdout.
ArrayRef< tracing::BreakpointManager * > getLogActionsLocFilters() const
Get the location breakpoint managers to use to filter out action logging.
std::vector< tracing::BreakpointManager * > logActionLocationFilter
Location Breakpoints to filter the action logging.
void enableDebuggerActionHook(bool enabled=true)
Options.
This is a RAII class that installs the debug handlers on the context based on the provided configurat...
InstallDebugHandler(MLIRContext &context, const DebugConfig &config)
Include the generated interface declarations.
const FrozenRewritePatternSet GreedyRewriteConfig config