Re: Fix LTO streaming of BUILTINS_LOCATION

2015-06-08 Thread Jan Hubicka
> > Yeah, I think streaming all locations up to RESERVED_LOCATION_COUNT > literally is more robust. Thus do > > bp_pack_int_in_range (bp, 0, RESERVED_LOCATION_COUNT, > loc < RESERVED_LOCATION_COUNT ? loc : > RESERVED_LOCATION_COUNT); > if (loc < RESERVED_LOCATION_COUNT

Re: Fix LTO streaming of BUILTINS_LOCATION

2015-06-08 Thread Richard Biener
On Mon, 8 Jun 2015, Jan Hubicka wrote: > > > + bp_pack_value (bp, loc == BUILTINS_LOCATION, 1); > > > + if (loc == BUILTINS_LOCATION) > > > +return; > > > > Hmm, with this and > > > > #define DECL_IS_BUILTIN(DECL) \ > > (LOCATION_LOCUS (DECL_SOURCE_LOCATION (DECL)) <= BUILTINS_LOCATION)

Re: Fix LTO streaming of BUILTINS_LOCATION

2015-06-08 Thread Jan Hubicka
> > + bp_pack_value (bp, loc == BUILTINS_LOCATION, 1); > > + if (loc == BUILTINS_LOCATION) > > +return; > > Hmm, with this and > > #define DECL_IS_BUILTIN(DECL) \ > (LOCATION_LOCUS (DECL_SOURCE_LOCATION (DECL)) <= BUILTINS_LOCATION) > > shouldn't we rather stream all locations <= BUILTIN

Re: Fix LTO streaming of BUILTINS_LOCATION

2015-06-08 Thread Richard Biener
On Mon, 8 Jun 2015, Jan Hubicka wrote: > Hi, > currently we stream BUILTINS_LOCATION by expanding it and streaming resulting > filename/line/col tripplet. That is a nonsense and breaks some logic > that special case it. > > This patch fixes it by special casing it same way as we do UNKNOWN_LOCAT

Fix LTO streaming of BUILTINS_LOCATION

2015-06-07 Thread Jan Hubicka
Hi, currently we stream BUILTINS_LOCATION by expanding it and streaming resulting filename/line/col tripplet. That is a nonsense and breaks some logic that special case it. This patch fixes it by special casing it same way as we do UNKNOWN_LOCATION (we have precisely 2 special location codes, so