llvm/mlir/include/mlir/Debug/ExecutionContext.h

//===- ExecutionContext.h -  Execution Context Support *- C++ -*-=============//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_TRACING_EXECUTIONCONTEXT_H
#define MLIR_TRACING_EXECUTIONCONTEXT_H

#include "mlir/Debug/BreakpointManager.h"
#include "mlir/IR/Action.h"
#include "llvm/ADT/SmallVector.h"

namespace mlir {
namespace tracing {

/// This class is used to keep track of the active actions in the stack.
/// It provides the current action but also access to the parent entry in the
/// stack. This allows to keep track of the nested nature in which actions may
/// be executed.
struct ActionActiveStack {};

/// The ExecutionContext is the main orchestration of the infrastructure, it
/// acts as a handler in the MLIRContext for executing an Action. When an action
/// is dispatched, it'll query its set of Breakpoints managers for a breakpoint
/// matching this action. If a breakpoint is hit, it passes the action and the
/// breakpoint information to a callback. The callback is responsible for
/// controlling the execution of the action through an enum value it returns.
/// Optionally, observers can be registered to be notified before and after the
/// callback is executed.
class ExecutionContext {};

} // namespace tracing
} // namespace mlir

#endif // MLIR_TRACING_EXECUTIONCONTEXT_H