Function tvm::script::ir_builder::ir::AddToParent

Function tvm::script::ir_builder::ir::AddToParent#

Function Documentation#

void tvm::script::ir_builder::ir::AddToParent(tvm::Stmt stmt, Location loc)#

Append a statement to the current statement frame or top-level builder result.

Parameters:
  • stmt – The statement to append, flattening top-level sequences with copy-on-write.

  • loc – The deferred source location, used only when the statement has UnknownLoc. Empty top-level sequences add no statements to an existing result. Existing statement locations and results retained by callers are preserved.

Throws:

ffi::Error – If an existing result is not a statement or the current frame cannot contain statements.