use visit_ast to determine size of insts