This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Improve partitioning decisions
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 30 Apr 2018 12:38:56 +0200
- Subject: Re: Improve partitioning decisions
- References: <20180428185551.GA48969@kam.mff.cuni.cz> <CAMe9rOqf7179Gd=3gHV8VYRSawfLriPcGvKbwK_=aRhxgRNjcQ@mail.gmail.com>
>
> FAIL: gcc.dg/lto/20081204-2 c_lto_20081204-2_0.o-c_lto_20081204-2_0.o
> link, -w -flto -fPIC -r -nostdlib (internal compiler error)
> FAIL: gcc.dg/lto/20090914-2 c_lto_20090914-2_0.o-c_lto_20090914-2_0.o
> link, -O2 -flto -fuse-linker-plugin (internal compiler error)
> FAIL: gcc.dg/lto/20091014-1 c_lto_20091014-1_0.o-c_lto_20091014-1_0.o
> link, -fPIC -r -nostdlib -flto (internal compiler error)
> FAIL: gcc.dg/lto/20100603-1 c_lto_20100603-1_0.o-c_lto_20100603-1_0.o
> link, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal
> compiler error)
> FAIL: gcc.dg/lto/20100603-1 c_lto_20100603-1_0.o-c_lto_20100603-1_0.o
> link, -O2 -flto -fuse-linker-plugin (internal compiler error)
> FAIL: g++.dg/lto/20081120-1
> cp_lto_20081120-1_0.o-cp_lto_20081120-1_1.o link, -flto -r -nostdlib
> (internal compiler error)
> FAIL: g++.dg/lto/20081120-2
> cp_lto_20081120-2_0.o-cp_lto_20081120-2_1.o link, -flto -r -nostdlib
> (internal compiler error)
Sorry, that was last minute fix into the sanity check. Curiously enough
the check incorrectly triggers for empty file. It is interesting we test
it so many times.
I am testing.
Index: lto-partition.c
===================================================================
--- lto-partition.c (revision 259755)
+++ lto-partition.c (working copy)
@@ -809,7 +809,7 @@
next_nodes.safe_push (noreorder[noreorder_pos++]);
/* For one partition the cost of boundary should be 0 unless we added final
symbols here (these are not accounted) or we have accounting bug. */
- gcc_assert (next_nodes.length () || npartitions != 1 || !best_cost);
+ gcc_assert (next_nodes.length () || npartitions != 1 || !best_cost || best_cost == -1);
add_sorted_nodes (next_nodes, partition);
free (order);