26#ifndef TVM_IR_INSTRUMENT_H_
27#define TVM_IR_INSTRUMENT_H_
29#include <tvm/ffi/reflection/registry.h>
30#include <tvm/ffi/string.h>
140 namespace refl = tvm::ffi::reflection;
Managed reference class to IRModuleNode.
Definition module.h:255
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
PassInstrumentNode forms an instrument implementation. It provides API for users to register callback...
Definition instrument.h:102
TVM_FFI_DECLARE_OBJECT_INFO("instrument.PassInstrument", PassInstrumentNode, ffi::Object)
virtual void ExitPassContext() const =0
Instrument when exiting PassContext. Called once within a PassContext.
virtual bool ShouldRun(const IRModule &mod, const transform::PassInfo &info) const =0
Determine whether to run the pass or not. Called multiple times depend on number of passes.
virtual void RunAfterPass(const IRModule &mod, const transform::PassInfo &info) const =0
Instrument after pass run. Called multiple time depend on number of passes.
virtual void RunBeforePass(const IRModule &mod, const transform::PassInfo &info) const =0
Instrument before pass run. Called multiple times depend on number of passes.
virtual ~PassInstrumentNode()
Definition instrument.h:107
virtual void EnterPassContext() const =0
Instrument when entering PassContext. Called once within a PassContext.
static void RegisterReflection()
Definition instrument.h:139
ffi::String name
Name of this pass instrument object.
Definition instrument.h:105
Managed reference class for PassInstrumentNode.
Definition instrument.h:150
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(PassInstrument, ffi::ObjectRef, PassInstrumentNode)
IRModuleFrame IRModule()
The IRModule declaration statement.
Definition module.h:248
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40