Class PassObj#

Inheritance Relationships#

Base Type#

  • public ffi::Object

Derived Type#

Class Documentation#

class PassObj : public ffi::Object#

PassObj is the base type of different types of optimization passes. It is designed as a pure class and implemented by different pass subclasses at different granularity of IR nodes.

Subclassed by tvm::transform::SequentialObj

Public Functions

inline virtual ~PassObj()#
virtual PassInfo Info() const = 0#

Get the pass information/meta data.

inline IRModule operator()(IRModule mod) const#

Transform mod using the default PassContext in the current scope.

Parameters:

mod – The module that an optimization pass runs on.

Returns:

The transformed module.

virtual IRModule operator()(IRModule mod, const PassContext &pass_ctx) const = 0#

Transform mod using a functor under a given pass context.

Parameters:
  • mod – The module that an optimization pass runs on.

  • pass_ctx – The pass context that can provide information for the optimization.

Returns:

The transformed module.

Public Static Functions

static inline int32_t _GetOrAllocRuntimeTypeIndex()#
static inline int32_t RuntimeTypeIndex() noexcept#