Update codegen a bit for function graph