This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix -fprofile-use miscompilation of tramp3d and read-rtl.c
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Sep 2008 11:48:23 +0200
- Subject: Fix -fprofile-use miscompilation of tramp3d and read-rtl.c
Hi,
this patch fixes tuplification bug that makes us to compile working
tramp3d with -fprofile-use again. I also fixed one uninitialized var
warking showing during profiledbootstrap. We now build -fprofile-use
cc1 that ICEs shortly in compiling libgcc on memory corruption.
Otherwise it seems to work and produce same output as non-profiled.
It is about 8% faster compiling GCC modules than unprofiled compiler.
Binary shrinks from 940Kb to 900Kb as a result of optimize_*_for_size
changes that is IMO quite nice.
Interestingly the largest speedups we used to have on empty files seems
gone (at least compiling 100 empty files takes about same time). I
think it is result of optimizing initialization of register move tables
and friends so we are now fully memory bound starting up.
Honza
* value-prof.c (gimple_ic): Fix tuplification bug.
* sched-deps.c (sched_insns_conditions_mutex_p): Silence unitialized var
warning.
Index: value-prof.c
===================================================================
*** value-prof.c (revision 140145)
--- value-prof.c (working copy)
*************** gimple_ic (gimple stmt, gimple call, str
*** 1117,1124 ****
bb1end = stmt3;
stmt1 = gimple_copy (stmt);
! gimple_call_set_fn (stmt,
! build_addr (direct_call->decl, current_function_decl));
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
bb2end = stmt1;
bb3end = stmt;
--- 1117,1123 ----
bb1end = stmt3;
stmt1 = gimple_copy (stmt);
! gimple_call_set_fndecl (stmt1, direct_call->decl);
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
bb2end = stmt1;
bb3end = stmt;
Index: sched-deps.c
===================================================================
*** sched-deps.c (revision 140145)
--- sched-deps.c (working copy)
*************** bool
*** 527,533 ****
sched_insns_conditions_mutex_p (const_rtx insn1, const_rtx insn2)
{
rtx cond1, cond2;
! bool rev1, rev2;
/* df doesn't handle conditional lifetimes entirely correctly;
calls mess up the conditional lifetimes. */
--- 527,533 ----
sched_insns_conditions_mutex_p (const_rtx insn1, const_rtx insn2)
{
rtx cond1, cond2;
! bool rev1 = false, rev2 = false;
/* df doesn't handle conditional lifetimes entirely correctly;
calls mess up the conditional lifetimes. */