RVO optimization of output buffer generation