This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Avoid redundant insn splitting pass


Hi,
this patch saves one insn splitting pass in optimizing compilation.

Honza

Wed Feb 26 20:29:33 CET 2003  Jan Hubicka  <jh at suse dot cz>
	* reg-stack.c (reg_to_stack): Don't split insns.
	* toplev.c (rest_of_compilation): rearange insn splitting passes.
Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reg-stack.c,v
retrieving revision 1.123
diff -c -3 -p -r1.123 reg-stack.c
*** reg-stack.c	21 Feb 2003 10:06:44 -0000	1.123
--- reg-stack.c	26 Feb 2003 19:27:27 -0000
*************** reg_to_stack (first, file)
*** 428,436 ****
    /* Clean up previous run.  */
    stack_regs_mentioned_data = 0;
  
-   if (!optimize)
-     split_all_insns (0);
- 
    /* See if there is something to do.  Flow analysis is quite
       expensive so we might save some compilation time.  */
    for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++)
--- 428,433 ----
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.719
diff -c -3 -p -r1.719 toplev.c
*** toplev.c	22 Feb 2003 19:25:19 -0000	1.719
--- toplev.c	26 Feb 2003 19:27:28 -0000
*************** rest_of_compilation (decl)
*** 3432,3438 ****
--- 3432,3440 ----
  #endif
  
    /* If optimizing, then go ahead and split insns now.  */
+ #ifndef STACK_REGS
    if (optimize > 0)
+ #endif
      split_all_insns (0);
  
    cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
*************** rest_of_compilation (decl)
*** 3503,3512 ****
        close_dump_file (DFI_ce3, print_rtl_with_bb, insns);
        timevar_pop (TV_IFCVT2);
      }
- #ifdef STACK_REGS
-   if (optimize)
-     split_all_insns (1);
- #endif
  
    if (optimize > 0)
      {
--- 3505,3510 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]