# NOTE(Ruibiao): Some vars maybe be the arguements of conditional_block op but no-need-buffer in the actual subblock, should not add them to the required_vars.
ifop.type=="conditional_block":
continue
ifnotop_info.is_build:
op_info=OpInOutInfo()
op_info.build_info(op)
ifop_info.is_needed(in_name):
vars_list[ip].add(in_name)
forout_nameinop.output_arg_names:
ifvar_can_be_deleted(out_name,program):
vars_list[ip].add(out_name)
# step2: get the `skip_gc_vars` that vars of current sub_program might be used in the later sub_program