This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[lto] Fix testsuite regressions on i686


Currently, we cannot pack more than HOST_BITS_PER_WIDE_INT bits
into a bitpack.  We were ICEing in just about every i686 test
case because of this.

It shouldn't be hard to loosen up this restriction and improve
internal fragmentation in bitpacks by packing in char-sized
blocks, but this was the simplest way of fixing all these
failures.

Tested on i686.


Diego.

	* lto-cgraph.c (lto_output_edge): Do not stream
	EDGE->COUNT inside a bitpack.
	(input_edge): Corresponding changes.

Index: lto-cgraph.c
===================================================================
--- lto-cgraph.c	(revision 149625)
+++ lto-cgraph.c	(working copy)
@@ -148,11 +148,12 @@ lto_output_edge (struct lto_simple_outpu
   gcc_assert (ref != LCC_NOT_FOUND); 
   lto_output_sleb128_stream (ob->main_stream, ref);
 
+  lto_output_sleb128_stream (ob->main_stream, edge->count);
+
   bp = bitpack_create ();
   uid = flag_wpa ? edge->lto_stmt_uid : gimple_uid (edge->call_stmt);
   bp_pack_value (bp, uid, HOST_BITS_PER_INT);
   bp_pack_value (bp, edge->inline_failed, HOST_BITS_PER_INT);
-  bp_pack_value (bp, edge->count, HOST_BITS_PER_WIDEST_INT);
   bp_pack_value (bp, edge->frequency, HOST_BITS_PER_INT);
   bp_pack_value (bp, edge->loop_nest, 30);
   bp_pack_value (bp, edge->indirect_call, 1);
@@ -521,11 +522,12 @@ input_edge (struct lto_input_block *ib, 
 
   caller_resolution = lto_symtab_get_resolution (caller->decl);
 
+  count = (gcov_type) lto_input_sleb128 (ib);
+
   bp = lto_input_bitpack (ib);
   stmt_id = (unsigned int) bp_unpack_value (bp, HOST_BITS_PER_INT);
   inline_failed = (cgraph_inline_failed_t) bp_unpack_value (bp,
 							    HOST_BITS_PER_INT);
-  count = (gcov_type) bp_unpack_value (bp, HOST_BITS_PER_WIDEST_INT);
   freq = (int) bp_unpack_value (bp, HOST_BITS_PER_INT);
   nest = (unsigned) bp_unpack_value (bp, 30);
 


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