9#ifndef MLIR_TRACING_DEBUGCOUNTER_H
10#define MLIR_TRACING_DEBUGCOUNTER_H
13#include "llvm/ADT/StringMap.h"
55 bool shouldExecute(StringRef tag);
58 void applyCLOptions();
63 : countToSkip(countToSkip), countToStopAfter(countToStopAfter) {}
74 llvm::StringMap<Counter> counters;
An action is a specific action that is to be taken by the compiler, that can be toggled and controlle...
static void registerCLOptions()
Register the command line options for debug counters.
void print(raw_ostream &os) const
Print the counters that have been registered with this instance to the provided output stream.
void addCounter(StringRef actionTag, int64_t countToSkip, int64_t countToStopAfter)
Add a counter for the given action tag.
static bool isActivated()
Returns true if any of the CL options are activated.
void operator()(llvm::function_ref< void()> transform, const Action &action)
Entry point for handling actions.
Include the generated interface declarations.