On Wed Oct 14, 2026 at 3:33 PM CEST, Martin Jambor wrote: > Hi, > > On Mon, Sep 21 2026, Josef Melcr wrote: >> This patch adds functions which simplify auto_vec<int> LTO streaming >> inside callback-info.cc. The functions are redundant for just the one >> vector, but I am creating them in advance, as I am adding an another >> vector field into callback_info in a different patch. That way, the >> code stays nice and tidy. >> >> gcc/ChangeLog: >> >> * callback-info.cc (stream_vector_out): New function, streams an >> auto_vec into an LTO output block. >> (stream_vector_in): New function, reads an auto_vec from an LTO >> input block. >> (callback_info::stream_out): Use stream_vector_out. >> (callback_info::stream_in): Use stream_vector_in. > > this is OK. (Though I wonder whether we want a more general function > template to stream an arbitrary vector by first streaming the number of > elements. We must have this pattern all over the place. But that is > not part of this effort.)
I suppose that could be done, the function could take some element streaming function as a parameter. There are a lot of things in the LTO streaming API which could be improved, we just have to find the time to do it :) > > Martin
