Function tvm::UndefinedVars

Function tvm::UndefinedVars#

Function Documentation#

inline ffi::Array<Var> tvm::UndefinedVars(ffi::AnyView object, const ffi::Array<Var> &defs = {})#

Find variable uses without a preceding definition in well-formed IR.

Definitions follow the structural definition-site metadata. Variable types are traversed at definitions, while variable uses are leaves. Scope and duplicate-definition validation belong to the IR verifier.

Parameters:
  • object – The IR object to visit.

  • defs – Variables already defined outside the object.

Returns:

Undefined variables, uniquely ordered by their first use.