This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
unconditional pre-reload splitter
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, patches at x86-64 dot org, gcc at gcc dot gnu dot org
- Subject: unconditional pre-reload splitter
- From: Jan Hubicka <jh at suse dot cz>
- Date: Mon, 25 Jun 2001 13:52:29 +0200
Hi,
this patch makes pre-reload splitting unconditional. This can be used
for kind of "code lowering". For instance identifying instructions
requiring temporary stack slot and allocating it for them, or adding
various clobbers and uses not important for earlier code generation.
I've also cleaned up a bit the other splitter calls.
Bootstrapped/regtested i586 with the previous patch.
Honza
Mon Jun 25 13:38:04 CEST 2001 Jan Hubicka <jh@suse.cz>
* haifa-sched.c (sched_init): Do not split insns.
* toplev.c (rest_of_compilation): Call split_all_insns before
sched1 pass; simplify condition of post-reload splitter;
call split_all_insn before sched2 pass.
Index: haifa-sched.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/haifa-sched.c,v
retrieving revision 1.179
diff -c -3 -p -r1.179 haifa-sched.c
*** haifa-sched.c 2001/03/22 18:48:29 1.179
--- haifa-sched.c 2001/06/25 11:35:06
*************** sched_init (dump_file)
*** 1906,1913 ****
/* Initialize issue_rate. */
issue_rate = ISSUE_RATE;
- split_all_insns (1);
-
/* We use LUID 0 for the fake insn (UID 0) which holds dependencies for
pseudos which do not cross calls. */
old_max_uid = get_max_uid () + 1;
--- 1906,1911 ----
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.472
diff -c -3 -p -r1.472 toplev.c
*** toplev.c 2001/06/21 16:50:56 1.472
--- toplev.c 2001/06/25 11:35:10
*************** rest_of_compilation (decl)
*** 3410,3422 ****
timevar_pop (TV_GCSE);
#endif
#ifdef INSN_SCHEDULING
/* Print function header into sched dump now
because doing the sched analysis makes some of the dump. */
if (optimize > 0 && flag_schedule_insns)
{
- timevar_push (TV_SCHED);
open_dump_file (DFI_sched, decl);
/* Do control and data sched analysis,
--- 3410,3425 ----
timevar_pop (TV_GCSE);
#endif
+ timevar_push (TV_SCHED);
+
+ split_all_insns (1);
+
#ifdef INSN_SCHEDULING
/* Print function header into sched dump now
because doing the sched analysis makes some of the dump. */
if (optimize > 0 && flag_schedule_insns)
{
open_dump_file (DFI_sched, decl);
/* Do control and data sched analysis,
*************** rest_of_compilation (decl)
*** 3425,3440 ****
schedule_insns (rtl_dump_file);
close_dump_file (DFI_sched, print_rtl_with_bb, insns);
- timevar_pop (TV_SCHED);
-
- ggc_collect ();
/* Register lifetime information was updated as part of verifying
the schedule. */
register_life_up_to_date = 1;
}
#endif
/* Determine if the current function is a leaf before running reload
since this can impact optimizations done by the prologue and
epilogue thus changing register elimination offsets. */
--- 3428,3443 ----
schedule_insns (rtl_dump_file);
close_dump_file (DFI_sched, print_rtl_with_bb, insns);
/* Register lifetime information was updated as part of verifying
the schedule. */
register_life_up_to_date = 1;
}
#endif
+ timevar_pop (TV_SCHED);
+ ggc_collect ();
+
/* Determine if the current function is a leaf before running reload
since this can impact optimizations done by the prologue and
epilogue thus changing register elimination offsets. */
*************** rest_of_compilation (decl)
*** 3510,3523 ****
}
/* If optimizing, then go ahead and split insns now since we are about
! to recompute flow information anyway. Since we can't split insns after
! reload, do the splitting unconditionally here to avoid gcc from losing
! REG_DEAD notes. */
! #ifdef STACK_REGS
! if (1)
! #else
if (optimize > 0)
- #endif
{
int old_labelnum = max_label_num ();
--- 3513,3520 ----
}
/* If optimizing, then go ahead and split insns now since we are about
! to recompute flow information anyway. */
if (optimize > 0)
{
int old_labelnum = max_label_num ();
*************** rest_of_compilation (decl)
*** 3618,3623 ****
--- 3615,3622 ----
/* Do control and data sched analysis again,
and write some more of the results to dump file. */
+
+ split_all_insns (1);
schedule_insns (rtl_dump_file);