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]

Make some passes work on the CFG instead of on the insns stream (updated)


Hi,

This is an updated version of the patch from
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00529.html.

Bootstrapped&tested on x86_64-unknown-linux-gnu and on i686.
OK for mainline?

Gr.
Steven

	* basic-block.h (life_analysis, delete_noop_moves):
	Update prototypes.
	* bt-load.c (branch_target_load_optimize): Don't take the
	insns stream as an argument.  Update the life_analysis calls.
	* combine.c (combine_instructions): Update delete_noop_moves
	calls.
	* flow.c (notice_stack_pointer_modification): Don't take the
	insns stream as an argument.  Work on the flow graph.
	(life_analysis): Likewise.
	(delete_noop_moves): Likewise.
	* passes.c (rest_of_handle_stack_regs): Update reg_to_stack call.
	(rest_of_handle_life): Update life_analysis call.
	(rest_of_compilation): Likewise, and also update
	branch_target_load_optimize call.
	* ra.c (reg_alloc): Update life_analysis call.
	* reg-stack.c (reg_to_stack): Likewise.  Also, don't take
	the insns stream as an argument.
	* regrename.c (copyprop_hardreg_forward): Update delete_noop_moves
	call.
	* rtl.c (branch_target_load_optimize, reg_to_stack): Update
	prototypes.
	* value-profile.c (branch_prob): Update life_analysis call.
	* web.c (web_main): Work on the CFG, not on the insns stream.

	* config/ip2k/ip2k.c (ip2k_reorg): Update life_analysis calls.
	* config/m68hc11/m68hc11.c (m68hc11_reorg): Likewise.
	* config/sh/sh.c (sh_output_mi_thunk): Likewise.

Index: basic-block.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/basic-block.h,v
retrieving revision 1.195
diff -c -3 -p -r1.195 basic-block.h
*** basic-block.h	13 May 2004 06:39:26 -0000	1.195
--- basic-block.h	14 May 2004 07:17:19 -0000
*************** enum update_life_extent
*** 564,570 ****
  					   insns.  */
  #define CLEANUP_CFGLAYOUT	256	/* Do cleanup in cfglayout mode.  */
  #define CLEANUP_LOG_LINKS	512	/* Update log links.  */
! extern void life_analysis (rtx, FILE *, int);
  extern int update_life_info (sbitmap, enum update_life_extent, int);
  extern int update_life_info_in_dirty_blocks (enum update_life_extent, int);
  extern int count_or_remove_death_notes (sbitmap, int);
--- 564,570 ----
  					   insns.  */
  #define CLEANUP_CFGLAYOUT	256	/* Do cleanup in cfglayout mode.  */
  #define CLEANUP_LOG_LINKS	512	/* Update log links.  */
! extern void life_analysis (FILE *, int);
  extern int update_life_info (sbitmap, enum update_life_extent, int);
  extern int update_life_info_in_dirty_blocks (enum update_life_extent, int);
  extern int count_or_remove_death_notes (sbitmap, int);
*************** extern void unlink_block (basic_block);
*** 618,624 ****
  extern void compact_blocks (void);
  extern basic_block alloc_block (void);
  extern void find_unreachable_blocks (void);
! extern int delete_noop_moves (rtx);
  extern basic_block force_nonfallthru (edge);
  extern rtx block_label (basic_block);
  extern bool forwarder_block_p (basic_block);
--- 618,624 ----
  extern void compact_blocks (void);
  extern basic_block alloc_block (void);
  extern void find_unreachable_blocks (void);
! extern int delete_noop_moves (void);
  extern basic_block force_nonfallthru (edge);
  extern rtx block_label (basic_block);
  extern bool forwarder_block_p (basic_block);
Index: bt-load.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bt-load.c,v
retrieving revision 2.19
diff -c -3 -p -r2.19 bt-load.c
*** bt-load.c	22 Mar 2004 02:57:25 -0000	2.19
--- bt-load.c	14 May 2004 07:17:19 -0000
*************** migrate_btr_defs (enum reg_class btr_cla
*** 1411,1417 ****
  }
  
  void
! branch_target_load_optimize (rtx insns, bool after_prologue_epilogue_gen)
  {
    enum reg_class class = targetm.branch_target_register_class ();
    if (class != NO_REGS)
--- 1411,1417 ----
  }
  
  void
! branch_target_load_optimize (bool after_prologue_epilogue_gen)
  {
    enum reg_class class = targetm.branch_target_register_class ();
    if (class != NO_REGS)
*************** branch_target_load_optimize (rtx insns, 
*** 1429,1435 ****
        cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
  #endif
  
!       life_analysis (insns, NULL, 0);
  
        /* Dominator info is also needed for migrate_btr_def.  */
        calculate_dominance_info (CDI_DOMINATORS);
--- 1429,1435 ----
        cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
  #endif
  
!       life_analysis (NULL, 0);
  
        /* Dominator info is also needed for migrate_btr_def.  */
        calculate_dominance_info (CDI_DOMINATORS);
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.427
diff -c -3 -p -r1.427 combine.c
*** combine.c	13 May 2004 06:39:33 -0000	1.427
--- combine.c	14 May 2004 07:17:20 -0000
*************** combine_instructions (rtx f, unsigned in
*** 750,756 ****
    EXECUTE_IF_SET_IN_SBITMAP (refresh_blocks, 0, i,
  			     BASIC_BLOCK (i)->flags |= BB_DIRTY);
    new_direct_jump_p |= purge_all_dead_edges (0);
!   delete_noop_moves (f);
  
    update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES,
  				    PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE
--- 750,756 ----
    EXECUTE_IF_SET_IN_SBITMAP (refresh_blocks, 0, i,
  			     BASIC_BLOCK (i)->flags |= BB_DIRTY);
    new_direct_jump_p |= purge_all_dead_edges (0);
!   delete_noop_moves ();
  
    update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES,
  				    PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE
Index: flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.587
diff -c -3 -p -r1.587 flow.c
*** flow.c	13 May 2004 06:39:39 -0000	1.587
--- flow.c	14 May 2004 07:17:21 -0000
*************** static int verify_wide_reg_1 (rtx *, voi
*** 291,297 ****
  static void verify_wide_reg (int, basic_block);
  static void verify_local_live_at_start (regset, basic_block);
  static void notice_stack_pointer_modification_1 (rtx, rtx, void *);
! static void notice_stack_pointer_modification (rtx);
  static void mark_reg (rtx, void *);
  static void mark_regs_live_at_end (regset);
  static void calculate_global_regs_live (sbitmap, sbitmap, int);
--- 291,297 ----
  static void verify_wide_reg (int, basic_block);
  static void verify_local_live_at_start (regset, basic_block);
  static void notice_stack_pointer_modification_1 (rtx, rtx, void *);
! static void notice_stack_pointer_modification (void);
  static void mark_reg (rtx, void *);
  static void mark_regs_live_at_end (regset);
  static void calculate_global_regs_live (sbitmap, sbitmap, int);
*************** first_insn_after_basic_block_note (basic
*** 351,362 ****
    return NEXT_INSN (insn);
  }
  
! /* Perform data flow analysis.
!    F is the first insn of the function; FLAGS is a set of PROP_* flags
!    to be used in accumulating flow info.  */
  
  void
! life_analysis (rtx f, FILE *file, int flags)
  {
  #ifdef ELIMINABLE_REGS
    int i;
--- 351,361 ----
    return NEXT_INSN (insn);
  }
  
! /* Perform data flow analysis for the whole control flow graph.
!    FLAGS is a set of PROP_* flags to be used in accumulating flow info.  */
  
  void
! life_analysis (FILE *file, int flags)
  {
  #ifdef ELIMINABLE_REGS
    int i;
*************** life_analysis (rtx f, FILE *file, int fl
*** 403,415 ****
  
    /* Always remove no-op moves.  Do this before other processing so
       that we don't have to keep re-scanning them.  */
!   delete_noop_moves (f);
  
    /* Some targets can emit simpler epilogues if they know that sp was
       not ever modified during the function.  After reload, of course,
       we've already emitted the epilogue so there's no sense searching.  */
    if (! reload_completed)
!     notice_stack_pointer_modification (f);
  
    /* Allocate and zero out data structures that will record the
       data from lifetime analysis.  */
--- 402,414 ----
  
    /* Always remove no-op moves.  Do this before other processing so
       that we don't have to keep re-scanning them.  */
!   delete_noop_moves ();
  
    /* Some targets can emit simpler epilogues if they know that sp was
       not ever modified during the function.  After reload, of course,
       we've already emitted the epilogue so there's no sense searching.  */
    if (! reload_completed)
!     notice_stack_pointer_modification ();
  
    /* Allocate and zero out data structures that will record the
       data from lifetime analysis.  */
*************** free_basic_block_vars (void)
*** 782,788 ****
  /* Delete any insns that copy a register to itself.  */
  
  int
! delete_noop_moves (rtx f ATTRIBUTE_UNUSED)
  {
    rtx insn, next;
    basic_block bb;
--- 781,787 ----
  /* Delete any insns that copy a register to itself.  */
  
  int
! delete_noop_moves (void)
  {
    rtx insn, next;
    basic_block bb;
*************** notice_stack_pointer_modification_1 (rtx
*** 866,873 ****
  }
  
  static void
! notice_stack_pointer_modification (rtx f)
  {
    rtx insn;
  
    /* Assume that the stack pointer is unchanging if alloca hasn't
--- 865,873 ----
  }
  
  static void
! notice_stack_pointer_modification (void)
  {
+   basic_block bb;
    rtx insn;
  
    /* Assume that the stack pointer is unchanging if alloca hasn't
*************** notice_stack_pointer_modification (rtx f
*** 876,892 ****
    if (! current_function_sp_is_unchanging)
      return;
  
!   for (insn = f; insn; insn = NEXT_INSN (insn))
!     {
!       if (INSN_P (insn))
! 	{
! 	  /* Check if insn modifies the stack pointer.  */
! 	  note_stores (PATTERN (insn), notice_stack_pointer_modification_1,
! 		       NULL);
! 	  if (! current_function_sp_is_unchanging)
! 	    return;
! 	}
!     }
  }
  
  /* Mark a register in SET.  Hard registers in large modes get all
--- 876,894 ----
    if (! current_function_sp_is_unchanging)
      return;
  
!   FOR_EACH_BB (bb)
!     FOR_BB_INSNS (bb, insn)
!       {
! 	if (INSN_P (insn))
! 	  {
! 	    /* Check if insn modifies the stack pointer.  */
! 	    note_stores (PATTERN (insn),
! 			 notice_stack_pointer_modification_1,
! 			 NULL);
! 	    if (! current_function_sp_is_unchanging)
! 	      return;
! 	  }
!       }
  }
  
  /* Mark a register in SET.  Hard registers in large modes get all
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.12
diff -c -3 -p -r2.12 passes.c
*** passes.c	13 May 2004 06:39:44 -0000	2.12
--- passes.c	14 May 2004 07:17:21 -0000
*************** rest_of_handle_stack_regs (tree decl, rt
*** 519,525 ****
    timevar_push (TV_REG_STACK);
    open_dump_file (DFI_stack, decl);
  
!   if (reg_to_stack (insns, dump_file) && optimize)
      {
        if (cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
  		       | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0))
--- 519,525 ----
    timevar_push (TV_REG_STACK);
    open_dump_file (DFI_stack, decl);
  
!   if (reg_to_stack (dump_file) && optimize)
      {
        if (cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
  		       | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0))
*************** rest_of_handle_life (tree decl, rtx insn
*** 1058,1064 ****
  #ifdef ENABLE_CHECKING
    verify_flow_info ();
  #endif
!   life_analysis (insns, dump_file, PROP_FINAL);
    if (optimize)
      cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_UPDATE_LIFE
  		 | CLEANUP_LOG_LINKS
--- 1058,1064 ----
  #ifdef ENABLE_CHECKING
    verify_flow_info ();
  #endif
!   life_analysis (dump_file, PROP_FINAL);
    if (optimize)
      cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_UPDATE_LIFE
  		 | CLEANUP_LOG_LINKS
*************** rest_of_compilation (tree decl)
*** 1726,1732 ****
        {
  	open_dump_file (DFI_branch_target_load, decl);
  
! 	branch_target_load_optimize (insns, false);
  
  	close_dump_file (DFI_branch_target_load, print_rtl_with_bb, insns);
  
--- 1726,1732 ----
        {
  	open_dump_file (DFI_branch_target_load, decl);
  
! 	branch_target_load_optimize (/*after_prologue_epilogue_gen=*/false);
  
  	close_dump_file (DFI_branch_target_load, print_rtl_with_bb, insns);
  
*************** rest_of_compilation (tree decl)
*** 1745,1751 ****
  
    if (optimize)
      {
!       life_analysis (insns, dump_file, PROP_POSTRELOAD);
        cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE
  		   | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
  
--- 1745,1751 ----
  
    if (optimize)
      {
!       life_analysis (dump_file, PROP_POSTRELOAD);
        cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE
  		   | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
  
*************** rest_of_compilation (tree decl)
*** 1815,1821 ****
  
        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);
  
--- 1815,1821 ----
  
        open_dump_file (DFI_branch_target_load, decl);
  
!       branch_target_load_optimize (/*after_prologue_epilogue_gen=*/true);
  
        close_dump_file (DFI_branch_target_load, print_rtl_with_bb, insns);
  
Index: ra.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra.c,v
retrieving revision 1.16
diff -c -3 -p -r1.16 ra.c
*** ra.c	24 Feb 2004 23:39:56 -0000	1.16
--- ra.c	14 May 2004 07:17:21 -0000
*************** reg_alloc (void)
*** 856,862 ****
    /* Cleanup the flow graph.  */
    if ((debug_new_regalloc & DUMP_LAST_FLOW) == 0)
      dump_file = NULL;
!   life_analysis (get_insns (), dump_file,
  		 PROP_DEATH_NOTES | PROP_LOG_LINKS  | PROP_REG_INFO);
    cleanup_cfg (CLEANUP_EXPENSIVE);
    recompute_reg_usage (get_insns (), TRUE);
--- 856,862 ----
    /* Cleanup the flow graph.  */
    if ((debug_new_regalloc & DUMP_LAST_FLOW) == 0)
      dump_file = NULL;
!   life_analysis (dump_file,
  		 PROP_DEATH_NOTES | PROP_LOG_LINKS  | PROP_REG_INFO);
    cleanup_cfg (CLEANUP_EXPENSIVE);
    recompute_reg_usage (get_insns (), TRUE);
Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reg-stack.c,v
retrieving revision 1.153
diff -c -3 -p -r1.153 reg-stack.c
*** reg-stack.c	7 May 2004 05:38:14 -0000	1.153
--- reg-stack.c	14 May 2004 07:17:21 -0000
*************** pop_stack (stack regstack, int regno)
*** 399,406 ****
  }
  
  /* Convert register usage from "flat" register file usage to a "stack
!    register file.  FIRST is the first insn in the function, FILE is the
!    dump file, if used.
  
     Construct a CFG and run life analysis.  Then convert each insn one
     by one.  Run a last cleanup_cfg pass, if optimizing, to eliminate
--- 399,405 ----
  }
  
  /* Convert register usage from "flat" register file usage to a "stack
!    register file.  FILE is the dump file, if used.
  
     Construct a CFG and run life analysis.  Then convert each insn one
     by one.  Run a last cleanup_cfg pass, if optimizing, to eliminate
*************** pop_stack (stack regstack, int regno)
*** 408,414 ****
     the edges.  */
  
  bool
! reg_to_stack (rtx first, FILE *file)
  {
    basic_block bb;
    int i;
--- 407,413 ----
     the edges.  */
  
  bool
! reg_to_stack (FILE *file)
  {
    basic_block bb;
    int i;
*************** reg_to_stack (rtx first, FILE *file)
*** 434,440 ****
  	  && flag_schedule_insns_after_reload))
      {
        count_or_remove_death_notes (NULL, 1);
!       life_analysis (first, file, PROP_DEATH_NOTES);
      }
    mark_dfs_back_edges ();
  
--- 433,439 ----
  	  && flag_schedule_insns_after_reload))
      {
        count_or_remove_death_notes (NULL, 1);
!       life_analysis (file, PROP_DEATH_NOTES);
      }
    mark_dfs_back_edges ();
  
Index: regrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regrename.c,v
retrieving revision 1.78
diff -c -3 -p -r1.78 regrename.c
*** regrename.c	22 Mar 2004 13:15:58 -0000	1.78
--- regrename.c	14 May 2004 07:17:21 -0000
*************** copyprop_hardreg_forward (void)
*** 1763,1769 ****
        /* ??? Irritatingly, delete_noop_moves does not take a set of blocks
  	 to scan, so we have to do a life update with no initial set of
  	 blocks Just In Case.  */
!       delete_noop_moves (get_insns ());
        update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
  			PROP_DEATH_NOTES
  			| PROP_SCAN_DEAD_CODE
--- 1763,1769 ----
        /* ??? Irritatingly, delete_noop_moves does not take a set of blocks
  	 to scan, so we have to do a life update with no initial set of
  	 blocks Just In Case.  */
!       delete_noop_moves ();
        update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
  			PROP_DEATH_NOTES
  			| PROP_SCAN_DEAD_CODE
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.471
diff -c -3 -p -r1.471 rtl.h
*** rtl.h	13 May 2004 06:39:45 -0000	1.471
--- rtl.h	14 May 2004 07:17:22 -0000
*************** extern void init_loop (void);
*** 2238,2244 ****
  #ifdef BUFSIZ
  extern void loop_optimize (rtx, FILE *, int);
  #endif
! extern void branch_target_load_optimize (rtx, bool);
  
  /* In function.c */
  extern void reposition_prologue_and_epilogue_notes (rtx);
--- 2238,2244 ----
  #ifdef BUFSIZ
  extern void loop_optimize (rtx, FILE *, int);
  #endif
! extern void branch_target_load_optimize (bool);
  
  /* In function.c */
  extern void reposition_prologue_and_epilogue_notes (rtx);
*************** extern int local_alloc (void);
*** 2341,2347 ****
  
  /* In reg-stack.c */
  #ifdef BUFSIZ
! extern bool reg_to_stack (rtx, FILE *);
  #endif
  
  /* In calls.c */
--- 2341,2347 ----
  
  /* In reg-stack.c */
  #ifdef BUFSIZ
! extern bool reg_to_stack (FILE *);
  #endif
  
  /* In calls.c */
Index: value-prof.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/value-prof.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 value-prof.c
*** value-prof.c	13 May 2004 06:39:52 -0000	1.10
--- value-prof.c	14 May 2004 07:17:22 -0000
*************** rtl_find_values_to_profile (unsigned *n_
*** 182,188 ****
    rtx insn;
    unsigned i;
  
!   life_analysis (get_insns (), NULL, PROP_DEATH_NOTES);
  
    *n_values = 0;
    *values = NULL;
--- 182,188 ----
    rtx insn;
    unsigned i;
  
!   life_analysis (NULL, PROP_DEATH_NOTES);
  
    *n_values = 0;
    *values = NULL;
Index: web.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/web.c,v
retrieving revision 2.8
diff -c -3 -p -r2.8 web.c
*** web.c	22 Mar 2004 02:57:27 -0000	2.8
--- web.c	14 May 2004 07:17:22 -0000
*************** web_main (void)
*** 262,267 ****
--- 262,268 ----
    int max = max_reg_num ();
    char *used;
    char *use_addressof;
+   basic_block bb;
    rtx insn;
  
    df = df_init ();
*************** web_main (void)
*** 280,288 ****
      union_defs (df, df->uses[i], def_entry, use_entry);
  
    /* We can not safely rename registers whose address is taken.  */
!   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
!     if (INSN_P (insn))
!       for_each_rtx (&PATTERN (insn), mark_addressof, use_addressof);
  
    /* Update the instruction stream, allocating new registers for split pseudos
       in progress.  */
--- 281,292 ----
      union_defs (df, df->uses[i], def_entry, use_entry);
  
    /* We can not safely rename registers whose address is taken.  */
!   FOR_EACH_BB (bb)
!     FOR_BB_INSNS (bb, insn)
!       {
! 	if (INSN_P (insn))
! 	  for_each_rtx (&PATTERN (insn), mark_addressof, use_addressof);
!       }
  
    /* Update the instruction stream, allocating new registers for split pseudos
       in progress.  */
Index: config/ip2k/ip2k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ip2k/ip2k.c,v
retrieving revision 1.37
diff -c -3 -p -r1.37 ip2k.c
*** config/ip2k/ip2k.c	30 Apr 2004 16:27:26 -0000	1.37
--- config/ip2k/ip2k.c	14 May 2004 07:17:22 -0000
*************** ip2k_reorg (void)
*** 5315,5321 ****
       things in such a way that another go will win.  Do so now!  */
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_REG_INFO | PROP_DEATH_NOTES);
    
    /* Look for where absurd things are happening with DP.  */
    mdr_try_dp_reload_elim (first_insn);
--- 5315,5321 ----
       things in such a way that another go will win.  Do so now!  */
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_REG_INFO | PROP_DEATH_NOTES);
    
    /* Look for where absurd things are happening with DP.  */
    mdr_try_dp_reload_elim (first_insn);
*************** ip2k_reorg (void)
*** 5327,5333 ****
  
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_REG_INFO | PROP_DEATH_NOTES);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
--- 5327,5333 ----
  
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_REG_INFO | PROP_DEATH_NOTES);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
*************** ip2k_reorg (void)
*** 5354,5360 ****
    mdr_try_move_pushes (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
  
    mdr_try_propagate_move (first_insn);
    mdr_resequence_xy_yx (first_insn);
--- 5354,5360 ----
    mdr_try_move_pushes (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
  
    mdr_try_propagate_move (first_insn);
    mdr_resequence_xy_yx (first_insn);
*************** ip2k_reorg (void)
*** 5368,5381 ****
  
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
  
    ip2k_reorg_split_simode = 1;
    split_all_insns (0);
--- 5368,5381 ----
  
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
  
    ip2k_reorg_split_simode = 1;
    split_all_insns (0);
*************** ip2k_reorg (void)
*** 5386,5399 ****
  
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
  
    ip2k_reorg_split_himode = 1;
    ip2k_reorg_merge_qimode = 1;
--- 5386,5399 ----
  
    reload_cse_regs (first_insn);
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
  
    ip2k_reorg_split_himode = 1;
    ip2k_reorg_merge_qimode = 1;
*************** ip2k_reorg (void)
*** 5411,5431 ****
    /* Call to  jump_optimize (...) was here, but now I removed it.  */
    
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
    mdr_try_remove_redundant_insns (first_insn);
  
    mdr_try_propagate_clr (first_insn);
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
  
    ip2k_reorg_split_qimode = 1;
    split_all_insns (0);
--- 5411,5431 ----
    /* Call to  jump_optimize (...) was here, but now I removed it.  */
    
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
    if (flag_peephole2)
      peephole2_optimize (NULL);
  
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
    mdr_try_remove_redundant_insns (first_insn);
  
    mdr_try_propagate_clr (first_insn);
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
  
    ip2k_reorg_split_qimode = 1;
    split_all_insns (0);
*************** ip2k_reorg (void)
*** 5434,5440 ****
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (first_insn, 0, PROP_FINAL);
  #endif
  }
  
--- 5434,5440 ----
    mdr_try_propagate_move (first_insn);
  
    find_basic_blocks (first_insn, max_reg_num (), 0);
!   life_analysis (0, PROP_FINAL);
  #endif
  }
  
Index: config/m68hc11/m68hc11.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/m68hc11.c,v
retrieving revision 1.102
diff -c -3 -p -r1.102 m68hc11.c
*** config/m68hc11/m68hc11.c	28 Mar 2004 12:00:26 -0000	1.102
--- config/m68hc11/m68hc11.c	14 May 2004 07:17:23 -0000
*************** m68hc11_reorg (void)
*** 5272,5278 ****
              }
          }
  
!       life_analysis (first, 0, PROP_REG_INFO | PROP_DEATH_NOTES);
      }
  
    z_replacement_completed = 2;
--- 5272,5278 ----
              }
          }
  
!       life_analysis (0, PROP_REG_INFO | PROP_DEATH_NOTES);
      }
  
    z_replacement_completed = 2;
Index: config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.269
diff -c -3 -p -r1.269 sh.c
*** config/sh/sh.c	13 May 2004 06:40:07 -0000	1.269
--- config/sh/sh.c	14 May 2004 07:17:23 -0000
*************** sh_output_mi_thunk (FILE *file, tree thu
*** 9526,9532 ****
    if (optimize > 0 && flag_schedule_insns_after_reload)
      {
        find_basic_blocks (insns, max_reg_num (), dump_file);
!       life_analysis (insns, dump_file, PROP_FINAL);
  
        split_all_insns (1);
  
--- 9526,9532 ----
    if (optimize > 0 && flag_schedule_insns_after_reload)
      {
        find_basic_blocks (insns, max_reg_num (), dump_file);
!       life_analysis (dump_file, PROP_FINAL);
  
        split_all_insns (1);
  

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