This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Better location streaming

> On Thu, May 26, 2011 at 12:45 PM, Jan Hubicka <> wrote:
> >>
> >> This looks all very hackish with no immediate benefit mostly because
> >> of the use of lto_output_string. ?I think what you should do instead
> >> is split up lto_output_string_with_length into the piece that streams
> >> the string itself to the string-stream and returns an index into it
> >> and the piece streaming the index to the specified stream. ?Then you
> >> can simply bitpack that index and the two int line / column fields.
> >
> > Hmm, I plan to optimize string streaming (since we always stream one uleb to
> > set it is non-NULL that can be easilly handled by assigining NULL string index
> > 0). ?How precisely you however suggest to bitpack line/column and string offset
> > together?
> Similar to how you suggested, stream bits for a changed flag but
> instead of finishing the bitpack simply stream HOST_BITS_PER_INT
> bits for line (if changed), colunn (if changed) and file string index (if
> changed and the index is 'int').
> I mostly want to avoid the split between the changed bits and the
> data output, esp. breaking the bitpack.

Well, that won't get me for < 1 byte overhead when location is unchanged or
unknown (that is true for about half of cases in my stats).  Additionally
HOST_BITS_PER_INT is host sensitive and wasteful compared to ulebs here as the
line numbers, file indexes and columns are all usually small numbers, so they
ought to fit in 16, 8 and 8 bits most of time.  So we would end up in need of
inventing something like uleb in bitpack?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]