public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix LTO streaming of BUILTINS_LOCATION
@ 2015-06-08  4:52 Jan Hubicka
  2015-06-08  7:35 ` Richard Biener
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Hubicka @ 2015-06-08  4:52 UTC (permalink / raw)
  To: rguenther, gcc-patches

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 doing compound bitpack is
not needed)

Bootstrapped/regtested ppc64le-linux, OK?

Honza

	* lto-streamer-out.c (lto_output_location): Correctly stream
	BUILTINS_LOCATION
	* lto-streamer-in (lto_input_location): Likewise.
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 224201)
+++ lto-streamer-out.c	(working copy)
@@ -205,6 +205,9 @@
   bp_pack_value (bp, loc == UNKNOWN_LOCATION, 1);
   if (loc == UNKNOWN_LOCATION)
     return;
+  bp_pack_value (bp, loc == BUILTINS_LOCATION, 1);
+  if (loc == BUILTINS_LOCATION)
+    return;
 
   xloc = expand_location (loc);
 
Index: lto-streamer-in.c
===================================================================
--- lto-streamer-in.c	(revision 224201)
+++ lto-streamer-in.c	(working copy)
@@ -283,6 +283,11 @@
       *loc = UNKNOWN_LOCATION;
       return;
     }
+  if (bp_unpack_value (bp, 1))
+    {
+      *loc = BUILTINS_LOCATION;
+      return;
+    }
   *loc = BUILTINS_LOCATION + 1;
 
   file_change = bp_unpack_value (bp, 1);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-08 22:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-08  4:52 Fix LTO streaming of BUILTINS_LOCATION Jan Hubicka
2015-06-08  7:35 ` Richard Biener
2015-06-08  7:39   ` Jan Hubicka
2015-06-08  7:47     ` Richard Biener
2015-06-08 22:33       ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).