This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] More check-gcc fixes
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 May 2009 11:27:10 -0400
- Subject: [lto] More check-gcc fixes
This fixes 7 failures in check-gcc. The streamer was not
emitting all the information for every basic block.
This converts some compile errors into runtime errors, but I'm
addressing those with an upcoming patch.
Tested on x86_64.
Diego.
* lto-function-out.c (output_bb): Write basic block
fields 'count', 'loop_depth', 'frequency' and 'flags'.
* lto-function-in.c (input_bb): Corresponding changes.
Index: lto-function-out.c
===================================================================
--- lto-function-out.c (revision 147487)
+++ lto-function-out.c (working copy)
@@ -1708,10 +1708,21 @@ output_bb (struct output_block *ob, basi
? LTO_bb1
: LTO_bb0);
- /* The index of the basic block. */
LTO_DEBUG_TOKEN ("bbindex");
output_uleb128 (ob, bb->index);
+ LTO_DEBUG_TOKEN ("count");
+ output_sleb128 (ob, bb->count);
+
+ LTO_DEBUG_TOKEN ("loop_depth");
+ output_sleb128 (ob, bb->loop_depth);
+
+ LTO_DEBUG_TOKEN ("frequency");
+ output_sleb128 (ob, bb->frequency);
+
+ LTO_DEBUG_TOKEN ("flags");
+ output_sleb128 (ob, bb->flags);
+
if (!gsi_end_p (bsi) || phi_nodes (bb))
{
/* Output the statements. The list of statements is terminated
Index: lto-function-in.c
===================================================================
--- lto-function-in.c (revision 147487)
+++ lto-function-in.c (working copy)
@@ -1816,6 +1816,18 @@ input_bb (struct lto_input_block *ib, en
index = lto_input_uleb128 (ib);
bb = BASIC_BLOCK_FOR_FUNCTION (fn, index);
+ LTO_DEBUG_TOKEN ("count");
+ bb->count = lto_input_sleb128 (ib);
+
+ LTO_DEBUG_TOKEN ("loop_depth");
+ bb->loop_depth = lto_input_sleb128 (ib);
+
+ LTO_DEBUG_TOKEN ("frequency");
+ bb->frequency = lto_input_sleb128 (ib);
+
+ LTO_DEBUG_TOKEN ("flags");
+ bb->flags = lto_input_sleb128 (ib);
+
/* LTO_bb1 has statements. LTO_bb0 does not. */
if (tag == LTO_bb0)
{