This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR opt/12617
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Dec 2003 14:23:13 +0100
- Subject: PR opt/12617
Hi,
this patch reorders ifcvt and bbro so we don't end up with strange
artefacts. Apparently no one remembers exactly why we did it other way
around, one possible explanation is that it allows more ifcvt to happen,
but Andreas kindly SPEC tested it and the results are positive. I am
not sure I can send the results so just summary:
Size of binaries:
164.gzip: Base: 62604 bytes
164.gzip: Peak: 62604 bytes
175.vpr: Base: 167322 bytes
175.vpr: Peak: 167322 bytes
176.gcc: Base: 1605961 bytes
176.gcc: Peak: 1605193 bytes
181.mcf: Base: 25525 bytes
181.mcf: Peak: 25525 bytes
186.crafty: Base: 224346 bytes
186.crafty: Peak: 224346 bytes
197.parser: Base: 143568 bytes
197.parser: Peak: 143568 bytes
252.eon: Base: 635177 bytes
252.eon: Peak: 635177 bytes
253.perlbmk: Base: 666949 bytes
253.perlbmk: Peak: 666949 bytes
254.gap: Base: 542358 bytes
254.gap: Peak: 542358 bytes
255.vortex: Base: 683474 bytes
255.vortex: Peak: 683410 bytes
256.bzip2: Base: 53888 bytes
256.bzip2: Peak: 53888 bytes
300.twolf: Base: 221391 bytes
300.twolf: Peak: 221391 bytes
=============================
Total: Base: 5032563 bytes
Total: Peak: 5031731 bytes
Compile time is 1% better and score is one spec point higher (down in
the noise)
PR opt/12617
* toplev.c (dump_file_index): Reorder ce3 and bbro.
(dump_file): Likewise.
(rest_of_compilation): Likewise.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.855
diff -c -3 -p -r1.855 toplev.c
*** toplev.c 29 Dec 2003 09:25:45 -0000 1.855
--- toplev.c 29 Dec 2003 10:16:27 -0000
*************** enum dump_file_index
*** 277,284 ****
DFI_flow2,
DFI_peephole2,
DFI_rnreg,
- DFI_bbro,
DFI_ce3,
DFI_branch_target_load,
DFI_sched2,
DFI_stack,
--- 277,284 ----
DFI_flow2,
DFI_peephole2,
DFI_rnreg,
DFI_ce3,
+ DFI_bbro,
DFI_branch_target_load,
DFI_sched2,
DFI_stack,
*************** static struct dump_file_info dump_file[D
*** 328,335 ****
{ "flow2", 'w', 1, 0, 0 },
{ "peephole2", 'z', 1, 0, 0 },
{ "rnreg", 'n', 1, 0, 0 },
- { "bbro", 'B', 1, 0, 0 },
{ "ce3", 'E', 1, 0, 0 },
{ "btl", 'd', 1, 0, 0 }, /* Yes, duplicate enable switch. */
{ "sched2", 'R', 1, 0, 0 },
{ "stack", 'k', 1, 0, 0 },
--- 328,335 ----
{ "flow2", 'w', 1, 0, 0 },
{ "peephole2", 'z', 1, 0, 0 },
{ "rnreg", 'n', 1, 0, 0 },
{ "ce3", 'E', 1, 0, 0 },
+ { "bbro", 'B', 1, 0, 0 },
{ "btl", 'd', 1, 0, 0 }, /* Yes, duplicate enable switch. */
{ "sched2", 'R', 1, 0, 0 },
{ "stack", 'k', 1, 0, 0 },
*************** rest_of_compilation (tree decl)
*** 3460,3473 ****
}
#endif
- if (optimize > 0)
- {
- if (flag_rename_registers || flag_cprop_registers)
- rest_of_handle_regrename (decl, insns);
-
- rest_of_handle_reorder_blocks (decl, insns);
- }
-
if (flag_if_conversion2)
{
timevar_push (TV_IFCVT2);
--- 3460,3465 ----
*************** rest_of_compilation (tree decl)
*** 3479,3501 ****
timevar_pop (TV_IFCVT2);
}
! if (flag_branch_target_load_optimize2)
! {
! /* Leave this a warning for now so that it is possible to experiment
! with running this pass twice. In 3.6, we should either make this
! an error, or use separate dump files. */
! if (flag_branch_target_load_optimize)
! warning ("branch target register load optimization is not intended "
! "to be run twice");
! open_dump_file (DFI_branch_target_load, decl);
! branch_target_load_optimize (insns, true);
! close_dump_file (DFI_branch_target_load, print_rtl_with_bb, insns);
! ggc_collect ();
! }
#ifdef INSN_SCHEDULING
if (optimize > 0 && flag_schedule_insns_after_reload)
--- 3471,3501 ----
timevar_pop (TV_IFCVT2);
}
! if (optimize > 0)
! {
! if (flag_rename_registers || flag_cprop_registers)
! rest_of_handle_regrename (decl, insns);
! rest_of_handle_reorder_blocks (decl, insns);
! }
!
! if (flag_branch_target_load_optimize2)
! {
! /* Leave this a warning for now so that it is possible to experiment
! with running this pass twice. In 3.6, we should either make this
! an error, or use separate dump files. */
! if (flag_branch_target_load_optimize)
! warning ("branch target register load optimization is not intended "
! "to be run twice");
! open_dump_file (DFI_branch_target_load, decl);
! branch_target_load_optimize (insns, true);
! close_dump_file (DFI_branch_target_load, print_rtl_with_bb, insns);
!
! ggc_collect ();
! }
#ifdef INSN_SCHEDULING
if (optimize > 0 && flag_schedule_insns_after_reload)