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]

Re: new patch for dataflow branch


I forgot to attach the patch.

Kenneth Zadeck wrote:
This patch fixes all of the regression on the x86-64 and about half of the regressions on the x86-32 and many of the regressions on power-pc darwin (there are still two left).

I also clean up my changelog entry from my previous commit.

Kenny

2005-10-23  Daniel Berlin  <dberlin@dberlin.org>
           Kenneth Zadeck <zadeck@naturalbridge.com>

* df.c (df_bitmaps_alloc, df_lr_local_compute, df_compute_all_blocks):
Removed df->all_blocks.
* df.c (df_lr_local_compute): Added flag to indicate that
blocks was really the whole function.
* df.c (df_ref_record): Fixed missing case for memory refs.
* df.c (df_insn_refs_record): Fixed regs ever live processing.
* df.c (df_bb_refs_record): Removed debugging code.
* df.c (df_bb_lr_local_compute, notice_stack_pointer_modification,
df_bb_lr_local_compute): Moved stack pointer modification
detection code back to flow.c.
* df.c (df_bb_lr_local_compute, hybrid_search_forward,
hybrid_search_backward): Formatting cleanup.
* df.c (df_compute_all_blocks, notice_stack_pointer_modification):
Removed.
* df.c (df_analyze): Changed the definition of whole program to be all
reachable blocks rather than all blocks.
* df.c (df_analyze_subcfg, df_analyze_simple_change_some_blocks): Added
parameter to df_lr_local_compute.
* df.c (df_rtx_reg_replace): Fixed way it decided it was processing
entire function.
* df.h: Removed all_blocks from struct df definition.
* flow.c (notice_stack_pointer_modification_1,
notice_stack_pointer_modification): Added back.
* flow.c (life_analysis): Added back call to
notice_stack_pointer_modification.
* flow.c (struct tree_opt_pass pass_life, rest_of_handle_flow2):
Added debugging.
* gcse.c (gcse_main, bypass_jumps): Additional places where we had missed
in renumbering entry and exit blocks.
* global.c (global_alloc): Additional debugging code.



Index: df.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/df.c,v
retrieving revision 1.87.6.4
diff -u -p -r1.87.6.4 df.c
--- df.c	20 Oct 2005 01:36:15 -0000	1.87.6.4
+++ df.c	23 Oct 2005 15:55:17 -0000
@@ -346,7 +346,7 @@ static void df_ru_local_compute (struct 
 static void df_bb_lr_local_compute (struct df *, basic_block);
 static void df_lr_confluence_0 (struct df *, void *, basic_block);
 static void df_lr_confluence_n (struct df *, void *, void*, edge e);
-static void df_lr_local_compute (struct df *, bitmap);
+static void df_lr_local_compute (struct df *, bitmap, bool);
 static void df_bb_ur_local_compute (struct df *, basic_block);
 static void df_ur_local_compute (struct df *, bitmap);
 static void df_ur_confluence_n (struct df *, void *, void*, edge e);
@@ -520,8 +520,7 @@ df_bitmaps_alloc (struct df *df, bitmap 
   df->n_defs = df->def_id;
   df->n_uses = df->use_id;
 
-  if (!blocks)
-    blocks = df->all_blocks;
+  gcc_assert (blocks);
 
   FOR_EACH_BB_IN_BITMAP (blocks, 0, bb,
     {
@@ -704,8 +703,6 @@ df_alloc (struct df *df, int n_regs)
 
   df->bbs = xcalloc (df->n_bbs, sizeof (struct df_bb_info));
 
-  if (!df->all_blocks)
-    df->all_blocks = BITMAP_ALLOC (NULL);
 }
 
 
@@ -743,7 +740,6 @@ df_free (struct df *df)
 
   BITMAP_FREE (df->bbs_modified);
   BITMAP_FREE (df->insns_modified);
-  BITMAP_FREE (df->all_blocks);
   BITMAP_FREE (df->hardware_regs_used);
 
   free_alloc_pool (df->ref_pool);
@@ -1038,15 +1034,20 @@ df_ref_record (struct df *df, rtx reg, r
 
       for (i = regno; i < endregno; i++)
 	{
-	  if (ref_type == DF_REF_REG_DEF)
+	  /* Calls are handled at call site because regs_ever_live doesn't include 
+	     clobbered regs, only used ones.  */
+	  if (ref_type == DF_REF_REG_DEF && ! CALL_P (insn))
 	    regs_ever_live[i] = 1;
-	  else if (ref_type == DF_REF_REG_USE)
+	  else if ((ref_type == DF_REF_REG_USE 
+		   || ref_type == DF_REF_REG_MEM_STORE
+		   || ref_type == DF_REF_REG_MEM_LOAD)
+		   && ((ref_flags & DF_REF_ARTIFICIAL) == 0) )
 	    {
 	      /* Set regs_ever live on uses of non-eliminable frame
 		 pointers and arg pointers.  */
 	      if (! (TEST_HARD_REG_BIT (elim_reg_set, regno)
 		     && (regno == FRAME_POINTER_REGNUM || regno == ARG_POINTER_REGNUM)))
-		  regs_ever_live[i] = 1;
+		regs_ever_live[i] = 1;
 	    }
 
 	  df_ref_record_1 (df, regno_reg_rtx[i], loc, insn, ref_type, ref_flags);
@@ -1540,6 +1541,22 @@ df_insn_refs_record (struct df *df, basi
 	      if (GET_CODE (XEXP (note, 0)) == USE)
 		df_uses_record (df, &XEXP (XEXP (note, 0), 0), DF_REF_REG_USE,
 				bb, insn, 0);
+              else if (GET_CODE (XEXP (note, 0)) == CLOBBER)
+		{
+		  if (REG_P (XEXP (XEXP (note, 0), 0)))
+		    {
+		      rtx reg = XEXP (XEXP (note, 0), 0);
+		      int regno_last;
+		      int regno_first;
+		      int i;
+		
+		      regno_last = regno_first = REGNO (reg);
+		      if (regno_first < FIRST_PSEUDO_REGISTER)
+			regno_last += hard_regno_nregs[regno_first][GET_MODE (reg)] - 1;
+		      for (i = regno_first; i <= regno_last; i++)
+			regs_ever_live[i] = 1;
+		    }
+		}
 	    }
 
 	  /* The stack ptr is used (honorarily) by a CALL insn.  */
@@ -1600,11 +1617,7 @@ df_bb_refs_record (struct df *df, basic_
 {
   rtx insn;
   rtx x;
-#if 0
-  unsigned int i;
-  bitmap_iterator bi;
-#endif  
-  
+
   /* Scan the block an insn at a time from beginning to end.  */
   FOR_BB_INSNS (bb, insn)
     {
@@ -2436,29 +2449,6 @@ df_exit_lr_local_compute (struct df *df)
   diddle_return_value (mark_reg, (void*)bb_info->lr_use);
 }
 
-#if 0
-/* Determine if the stack pointer is constant over the life of the function.
-   Only useful before prologues have been emitted.  */
-
-static void
-notice_stack_pointer_modification (rtx x, 
-				   rtx pat ATTRIBUTE_UNUSED,
-				   void *data ATTRIBUTE_UNUSED)
-{
-  if (x == stack_pointer_rtx
-      /* The stack pointer is only modified indirectly as the result
-	 of a push until later in flow.  See the comments in rtl.texi
-	 regarding Embedded Side-Effects on Addresses.  */
-      || (MEM_P (x)
-	  && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == RTX_AUTOINC
-	  && XEXP (XEXP (x, 0), 0) == stack_pointer_rtx))
-
-    {
-      current_function_sp_is_unchanging = 0;
-    }
-}
-#endif
-
 /* Compute local live register info for basic block BB.  */
 static void
 df_bb_lr_local_compute (struct df *df, basic_block bb)
@@ -2474,19 +2464,6 @@ df_bb_lr_local_compute (struct df *df, b
       if (! INSN_P (insn))
 	continue;	
 
-#if 0
-      /* FIXME: When we finally get rid of flow.c, the call to
-	 life_analysis needs to pass a flag that enables this code.
-	 Until then, the code in flow sets this up. This code may also
-	 have a problem in that it sets the this after needed use in
-	 the exit block.  */
-      if ((!reload_completed) && current_function_sp_is_unchanging)
-	/* Check if insn modifies the stack pointer.  */
-	note_stores (PATTERN (insn),
-		     notice_stack_pointer_modification,
-		     NULL);
-#endif
-
       for (link = df->insns[uid].defs; link; link = link->next)
 	{
 	  struct ref *def = link->ref;
@@ -2494,19 +2471,19 @@ df_bb_lr_local_compute (struct df *df, b
 	  
 	  if (!CALL_P (insn))
 	    {
-	      /* Add def to set of defs in this BB.  */
-	      bitmap_set_bit (bb_info->lr_def, dregno);
 	      if (dregno < FIRST_PSEUDO_REGISTER)
 		{
 		  unsigned int i;
 		  for (i = dregno; 
-		   i <= dregno + hard_regno_nregs[dregno][GET_MODE (DF_REF_REG (def))] - 1;
+		       i <= dregno + hard_regno_nregs[dregno][GET_MODE (DF_REF_REG (def))] - 1;
 		       ++i)
 		    {
 		      if (DF_INSN_CONTAINS_ASM (df, insn))
 			regs_asm_clobbered[i] = 1;
 		    }
 		}
+	      /* Add def to set of defs in this BB.  */
+	      bitmap_set_bit (bb_info->lr_def, dregno);
 	      bitmap_clear_bit (bb_info->lr_use, dregno);
 	    }
 	  else
@@ -2557,18 +2534,15 @@ df_bb_lr_local_compute (struct df *df, b
 /* Compute local live register info for each basic block within BLOCKS.  */
 
 static void
-df_lr_local_compute (struct df *df, bitmap blocks)
+df_lr_local_compute (struct df *df, bitmap blocks, bool everything)
 {
   basic_block bb;
 
   /* Assume that the stack pointer is unchanging if alloca hasn't
      been used.  */
-  if (blocks == df->all_blocks)
+  if (everything)
     {
 #if 0
-      current_function_sp_is_unchanging = !current_function_calls_alloca;
-#endif
-#if 0
       memset (regs_ever_live, 0, sizeof (regs_ever_live));
 #endif
       memset (regs_asm_clobbered, 0, sizeof (regs_asm_clobbered));
@@ -3098,25 +3072,6 @@ df_luids_set (struct df *df, bitmap bloc
   return total;
 }
 
-
-/* Compute all of the blocks in the function.  */
-static bitmap 
-df_compute_all_blocks (struct df *df)
-{
-  basic_block bb;
-  bitmap blocks;
-  if (df->all_blocks)
-    bitmap_clear (df->all_blocks);
-  else
-    df->all_blocks = BITMAP_ALLOC (NULL);
-
-  blocks = df->all_blocks;
-
-  FOR_ALL_BB (bb)
-    bitmap_set_bit (blocks, bb->index);
-  return blocks;
-}
-
 /* Analyze dataflow info for the basic blocks specified by the bitmap
    BLOCKS, or for the whole CFG if BLOCKS is zero.  */
 
@@ -3128,22 +3083,24 @@ df_analyze (struct df *df, bitmap blocks
   struct dataflow dflow;
   int * postorder = xmalloc (sizeof (int) * last_basic_block);
   bitmap scanning;
-  bitmap iterating;
+  bitmap iterating = BITMAP_ALLOC (NULL);
   int n_blocks;
+  bool everything;
+  int i;
 
   /* We could deal with additional basic blocks being created by
      rescanning everything again.  */
 
   if (!blocks)
-  {
-    if (df->n_bbs)
-      {
-	/* Recompute everything from scratch.  */
-	df_free (df);
-      }
-    /* Allocate and initialize data structures.  */
-    df_alloc (df, max_reg_num ());
-  }
+    {
+      if (df->n_bbs)
+	{
+	  /* Recompute everything from scratch.  */
+	  df_free (df);
+	}
+      /* Allocate and initialize data structures.  */
+      df_alloc (df, max_reg_num ());
+    }
 
   gcc_assert (df->n_bbs);
   df_bb_table_realloc (df, last_basic_block);
@@ -3166,13 +3123,27 @@ df_analyze (struct df *df, bitmap blocks
   if (flags & DF_UR)
     aflags |= DF_LR;
 
-  iterating = df_compute_all_blocks (df);
+  n_blocks = post_order_compute (postorder, true);
+  for (i=0; i<n_blocks; i++)
+    bitmap_set_bit (iterating, postorder[i]);
+
   if (blocks)
+    {
       scanning = blocks;
+      everything = false;
+    }
   else
     {
       blocks = iterating;
       scanning = iterating;
+      everything = true;
+
+      /* We can only do dataflow analysis over reachable blocks, so if
+	 we find that some are not reachable, we need to get rid of
+	 them because the rest of the compiler is not tolerant of
+	 having some blocks with no info.  */
+      if (n_blocks != n_basic_blocks)
+	delete_unreachable_blocks ();
     }
 
   df->flags = flags;
@@ -3206,8 +3177,6 @@ df_analyze (struct df *df, bitmap blocks
       df_reg_use_chain_create (df, blocks, false);
     }
 
-  n_blocks = post_order_compute (postorder, true);
-
   /* Compute the sets of gens and kills for the defs of each bb.  */
   dflow.in = xmalloc (sizeof (bitmap) * last_basic_block);
   dflow.out = xmalloc (sizeof (bitmap) * last_basic_block);
@@ -3225,7 +3194,7 @@ df_analyze (struct df *df, bitmap blocks
   if (aflags & DF_UD_CHAIN)
     {
       /* Create use-def chains.  */
-      df_ud_chain_create (df, df->all_blocks);
+      df_ud_chain_create (df, iterating);
 
       if (! (flags & DF_RD))
 	dflags |= DF_RD;
@@ -3242,7 +3211,7 @@ df_analyze (struct df *df, bitmap blocks
   if (aflags & DF_DU_CHAIN)
     {
       /* Create def-use chains.  */
-      df_du_chain_create (df, df->all_blocks);
+      df_du_chain_create (df, iterating);
 
       if (! (flags & DF_RU))
 	dflags |= DF_RU;
@@ -3254,7 +3223,7 @@ df_analyze (struct df *df, bitmap blocks
 
   if (aflags & DF_LR)
     {
-      df_lr_local_compute (df, scanning);
+      df_lr_local_compute (df, scanning, everything);
       df_lr_set_dflow (&dflow, df, iterating, 
 		       iterating, postorder, n_blocks, false);
       iterative_dataflow (&dflow);
@@ -3262,7 +3231,7 @@ df_analyze (struct df *df, bitmap blocks
 
   if (aflags & DF_REG_INFO)
     {
-      df_reg_info_compute (df, df->all_blocks);
+      df_reg_info_compute (df, iterating);
     }
 
   if (aflags & DF_UR)
@@ -3275,7 +3244,7 @@ df_analyze (struct df *df, bitmap blocks
 
   if (aflags & DF_REG_INFO)
     {
-      df_reg_info_compute (df, df->all_blocks);
+      df_reg_info_compute (df, iterating);
     }
 
   free (dflow.in);
@@ -3284,6 +3253,7 @@ df_analyze (struct df *df, bitmap blocks
   free (dflow.kill);
   free (postorder);
 
+  BITMAP_FREE (iterating);
   bitmap_zero (df->bbs_modified);
   bitmap_zero (df->insns_modified);
 /*   df_dump (df, stderr); */
@@ -3620,7 +3590,7 @@ df_analyze_subcfg (struct df *df, bitmap
   if (flags & DF_LR)
     {
       /* Compute the sets of defs and uses of live variables.  */
-      df_lr_local_compute (df, blocks);
+      df_lr_local_compute (df, blocks, false);
       df_lr_set_dflow (&dflow, df, blocks, blocks, postorder, n_blocks, false);
       iterative_dataflow (&dflow);
     }
@@ -3779,7 +3749,7 @@ df_analyze_simple_change_some_blocks (st
   if (flags & DF_LR)
     {
       /* Compute the sets of defs and uses of live variables.  */
-      df_lr_local_compute (df, blocks);
+      df_lr_local_compute (df, blocks, false);
       df_lr_set_dflow (&dflow, df, blocks_in_fringe, blocks, 
 		       blocks_in_postorder, n_blocks, true);
       iterative_dataflow (&dflow);
@@ -4065,14 +4035,12 @@ df_rtx_reg_replace (rtx *px, void *data)
    BLOCKS of basic blocks with NEWREG.  Also update the regs within
    REG_NOTES.  */
 void
-df_refs_reg_replace (struct df *df, bitmap blocks, struct df_link *chain, rtx oldreg, rtx newreg)
+df_refs_reg_replace (struct df *df, bitmap blocks, 
+		     struct df_link *chain, rtx oldreg, rtx newreg)
 {
   struct df_link *link;
   replace_args args;
 
-  if (! blocks)
-    blocks = df_compute_all_blocks (df);
-
   args.match = oldreg;
   args.replacement = newreg;
   args.modified = 0;
@@ -4085,7 +4053,8 @@ df_refs_reg_replace (struct df *df, bitm
       if (! INSN_P (insn))
 	continue;
 
-      gcc_assert (bitmap_bit_p (blocks, DF_REF_BBNO (ref)));
+      if (blocks)
+	gcc_assert (bitmap_bit_p (blocks, DF_REF_BBNO (ref)));
       
       df_ref_reg_replace (df, ref, oldreg, newreg);
 
@@ -5262,8 +5231,6 @@ hybrid_search_forward (basic_block bb, s
   RESET_BIT (dataflow->pending, i);
 
   /*  Calculate <conf_op> of predecessor_outs.  */
-
-
   if (EDGE_COUNT (bb->preds) > 0)
     FOR_EACH_EDGE (e, ei, bb->preds)
       {
@@ -5327,7 +5294,7 @@ hybrid_search_backward (basic_block bb, 
 	  continue;							
 	
 	(*dataflow->problem->confun_n)(dataflow->df, 
-				       dataflow->out[i],      			        
+				       dataflow->out[i],
 				       dataflow->in[e->dest->index],
 				       e);
       }								
@@ -5335,34 +5302,34 @@ hybrid_search_backward (basic_block bb, 
     (*dataflow->problem->confun_0)(dataflow->df, dataflow->out[i], bb);
 
   (*dataflow->problem->transfun)(i, &result_changed,
-				 dataflow->in[i], dataflow->out[i],		
-				 dataflow->gen[i], dataflow->kill[i],	
-				 dataflow->data);				
+				 dataflow->in[i], dataflow->out[i],
+				 dataflow->gen[i], dataflow->kill[i],
+				 dataflow->data);
   
   if (!result_changed || dataflow->single_pass)
-    return;							
+    return;
   
-  FOR_EACH_EDGE (e, ei, bb->preds)					
+  FOR_EACH_EDGE (e, ei, bb->preds)
     {								
-      if (e->src->index == i)					
-	continue;							
-      
-      if (!TEST_BIT (dataflow->considered, e->src->index))			
-	continue;							
+      if (e->src->index == i)
+	continue;
       
-      SET_BIT (dataflow->pending, e->src->index);				
+      if (!TEST_BIT (dataflow->considered, e->src->index))
+	continue;
+
+      SET_BIT (dataflow->pending, e->src->index);
     }								
   
-  FOR_EACH_EDGE (e, ei, bb->preds)					
-    {								
-      if (e->src->index == i)					
-	continue;							
-      
-      if (!TEST_BIT (dataflow->considered, e->src->index))			
+  FOR_EACH_EDGE (e, ei, bb->preds)
+    {
+      if (e->src->index == i)
+	continue;
+
+      if (!TEST_BIT (dataflow->considered, e->src->index))
 	continue;
       
-      if (!TEST_BIT (dataflow->visited, e->src->index))			
-	hybrid_search_backward (e->src, dataflow); 
+      if (!TEST_BIT (dataflow->visited, e->src->index))
+	hybrid_search_backward (e->src, dataflow);
     }
 }
 
Index: df.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/df.h,v
retrieving revision 1.34.8.2
diff -u -p -r1.34.8.2 df.h
--- df.h	19 Oct 2005 13:44:35 -0000	1.34.8.2
+++ df.h	23 Oct 2005 15:55:17 -0000
@@ -185,7 +185,6 @@ struct df
   unsigned int use_id_save;	/* Saved next use ID.  */
   bitmap insns_modified;	/* Insns that (may) have changed.  */
   bitmap bbs_modified;		/* Blocks that (may) have changed.  */
-  bitmap all_blocks;		/* All blocks in CFG.  */
   bitmap hardware_regs_used;    /* The set of hardware registers used.  */
 #ifdef STACK_REGS
   bitmap stack_regs;		/* Registers that may be allocated to a STACK_REGS.  */
@@ -199,8 +198,6 @@ struct df
   alloc_pool link_pool;
 };
 
-
-
 struct df_map
 {
   rtx old;
Index: flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.635.2.2
diff -u -p -r1.635.2.2 flow.c
--- flow.c	19 Oct 2005 13:44:35 -0000	1.635.2.2
+++ flow.c	23 Oct 2005 15:55:18 -0000
@@ -289,6 +289,8 @@ static int verify_wide_reg_1 (rtx *, voi
 static void verify_wide_reg (int, basic_block);
 static void verify_local_live_at_start (regset, basic_block);
 #endif
+static void notice_stack_pointer_modification_1 (rtx, rtx, void *);
+static void notice_stack_pointer_modification (void);
 static void propagate_block_delete_insn (rtx);
 static rtx propagate_block_delete_libcall (rtx, rtx);
 static int insn_dead_p (struct propagate_block_info *, rtx, int, rtx);
@@ -400,6 +402,12 @@ life_analysis (FILE *file, int flags)
   /* 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 ();
+
+  /* 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.  */
   /* Allocate and zero out data structures that will record the
      data from lifetime analysis.  */
   allocate_reg_life_data ();
@@ -837,6 +845,50 @@ delete_dead_jumptables (void)
     }
 }
 
+/* Determine if the stack pointer is constant over the life of the function.
+   Only useful before prologues have been emitted.  */
+
+static void
+notice_stack_pointer_modification_1 (rtx x, rtx pat ATTRIBUTE_UNUSED,
+				     void *data ATTRIBUTE_UNUSED)
+{
+  if (x == stack_pointer_rtx
+      /* The stack pointer is only modified indirectly as the result
+	 of a push until later in flow.  See the comments in rtl.texi
+	 regarding Embedded Side-Effects on Addresses.  */
+      || (MEM_P (x)
+	  && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == RTX_AUTOINC
+	  && XEXP (XEXP (x, 0), 0) == stack_pointer_rtx))
+    current_function_sp_is_unchanging = 0;
+}
+
+static void
+notice_stack_pointer_modification (void)
+{
+  basic_block bb;
+  rtx insn;
+
+  /* Assume that the stack pointer is unchanging if alloca hasn't
+     been used.  */
+  current_function_sp_is_unchanging = !current_function_calls_alloca;
+  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;
+	  }
+      }
+}
+
 
 /* This structure is used to pass parameters to and from the
    the function find_regno_partial(). It is used to pass in the
@@ -4013,6 +4065,9 @@ struct tree_opt_pass pass_life =
 static void
 rest_of_handle_flow2 (void)
 {
+#if 0
+  int i;
+#endif
   /* If optimizing, then go ahead and split insns now.  */
 #ifndef STACK_REGS
   if (optimize > 0)
@@ -4024,7 +4079,11 @@ rest_of_handle_flow2 (void)
 
   if (optimize)
     cleanup_cfg (CLEANUP_EXPENSIVE);
-
+#if 0
+  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+    fprintf (stderr, "regs_ever_live[%d]=%d before prologue\n", i,
+	     regs_ever_live[i]);
+#endif
   /* On some machines, the prologue and epilogue code, or parts thereof,
      can be represented as RTL.  Doing so lets us schedule insns between
      it and the rest of the code and also allows delayed branch
@@ -4032,6 +4091,11 @@ rest_of_handle_flow2 (void)
   thread_prologue_and_epilogue_insns (get_insns ());
   epilogue_completed = 1;
   flow2_completed = 1;
+#if 0
+  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+    fprintf (stderr, "regs_ever_live[%d]=%d after prologue\n", i,
+	     regs_ever_live[i]);
+#endif
 }
 
 struct tree_opt_pass pass_flow2 =
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.349.2.1
diff -u -p -r1.349.2.1 gcse.c
--- gcse.c	6 Oct 2005 14:14:29 -0000	1.349.2.1
+++ gcse.c	23 Oct 2005 15:55:19 -0000
@@ -691,7 +691,7 @@ gcse_main (rtx f ATTRIBUTE_UNUSED, FILE 
     dump_flow_info (file);
 
   /* Return if there's nothing to do, or it is too expensive.  */
-  if (n_basic_blocks <= 1 || is_too_expensive (_("GCSE disabled")))
+  if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1 || is_too_expensive (_("GCSE disabled")))
     return 0;
 
   gcc_obstack_init (&gcse_obstack);
@@ -6512,7 +6512,8 @@ bypass_jumps (FILE *file)
     dump_flow_info (file);
 
   /* Return if there's nothing to do, or it is too expensive.  */
-  if (n_basic_blocks <= 1 || is_too_expensive (_ ("jump bypassing disabled")))
+  if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1 || 
+      is_too_expensive (_ ("jump bypassing disabled")))
     return 0;
 
   gcc_obstack_init (&gcse_obstack);
Index: global.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/global.c,v
retrieving revision 1.132.2.2
diff -u -p -r1.132.2.2 global.c
--- global.c	19 Oct 2005 13:44:35 -0000	1.132.2.2
+++ global.c	23 Oct 2005 15:55:19 -0000
@@ -340,8 +340,16 @@ global_alloc (FILE *file)
   max_regno = max_reg_num ();
   compact_blocks ();
   df_analyze (rtl_df, 0, DF_LR | DF_UR | DF_HARD_REGS | DF_ARTIFICIAL_USES);
+  if (dump_file)
+    df_dump (rtl_df, dump_file);
   max_allocno = 0;
 
+#if 0
+  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+    fprintf (stderr, "regs_ever_live[%d]=%d before ra\n", i,
+	     regs_ever_live[i]);
+#endif
+
   /* A machine may have certain hard registers that
      are safe to use only within a basic block.  */
 

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