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]

[ira] bootstrap failure fixes after last merge from trunk


The patch mainly fixes bootstrap failures on x86/x86_64/ppc64 occurred
after last merge from the trunk.  The patch contains also some
cleaning up the code.

Vlad

2008-03-31 Vladimir Makarov <vmakarov@redhat.com>

	* ira-color.c (push_allocnos_to_stack): Don't use double.  Use
	const as the secondary heuristic.

	* ira-emit.c (set_allocno_reg): Change cap reg too.  Process all
	loop parents.
	
	* doc/invoke.texi (-fira-coalescing): Change to -fira-coalesce.

* toplev.h (flag_lower_subreg): Remove.

* global.c (build_insn_chain): Remove the prototype.

* alias.c (value_addr_p): Change comment.

* emit-rtl.c (gen_lowpart_common): Remove CONCATN.

* simplify-rtx.c (simplify_subreg): Ditto.

* common.opt (flower-subreg): Remove.

	* config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Fix last
	merge.

Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 133761)
+++ doc/invoke.texi	(working copy)
@@ -273,7 +273,8 @@ Objective-C and Objective-C++ Dialects}.
 @xref{Debugging Options,,Options for Debugging Your Program or GCC}.
 @gccoptlist{-d@var{letters}  -dumpspecs  -dumpmachine  -dumpversion @gol
 -fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
--fdump-noaddr -fdump-unnumbered  -fdump-translation-unit@r{[}-@var{n}@r{]} @gol
+-fdump-noaddr -fdump-unnumbered -fdump-simple-rtl @gol
+-fdump-translation-unit@r{[}-@var{n}@r{]} @gol
 -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
 -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol
 -fdump-tree-all @gol
@@ -333,8 +334,8 @@ Objective-C and Objective-C++ Dialects}.
 -fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
 -fipa-type-escape -fira -fira-algorithm=@var{algorithm} @gol
 -fira-coalesce -fira-ipra -fno-ira-move-spills @gol
--fira-propagate-cost -fno-ira-share-spill-slots @gol
--fno-ira-share-save-slots -fira-verbose=@var{n} @gol
+-fira-propagate-cost -fno-ira-share-save-slots @gol
+-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
 -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
 -fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
 -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
@@ -5645,8 +5646,8 @@ set, the second one is faster and genera
 smallest size code, and the mixed algorithm usually give the best
 results in most cases and for most architectures.
 
-@item -fira-coalescing
-@opindex fira-coalescing
+@item -fira-coalesce
+@opindex fira-coalesce
 Do optimistic register coalescing.  This option might be profitable for
 architectures with big regular register files.
 
Index: toplev.h
===================================================================
--- toplev.h	(revision 133761)
+++ toplev.h	(working copy)
@@ -124,7 +124,6 @@ extern int flag_crossjumping;
 extern int flag_if_conversion;
 extern int flag_if_conversion2;
 extern int flag_keep_static_consts;
-extern int flag_lower_subreg;
 extern int flag_peel_loops;
 extern int flag_rerun_cse_after_loop;
 extern int flag_thread_jumps;
Index: ira-color.c
===================================================================
--- ira-color.c	(revision 133761)
+++ ira-color.c	(working copy)
@@ -841,7 +841,8 @@ static void
 push_allocnos_to_stack (void)
 {
   int i, j;
-  double allocno_pri, i_allocno_pri;
+  int allocno_pri, i_allocno_pri;
+  int allocno_cost, i_allocno_cost;
   allocno_t allocno, i_allocno;
   allocno_t *allocno_vec;
   enum reg_class cover_class;
@@ -903,7 +904,7 @@ push_allocnos_to_stack (void)
       ira_assert (num > 0);
       allocno_vec = cover_class_allocnos [cover_class];
       allocno = NULL;
-      allocno_pri = 0;
+      allocno_pri = allocno_cost = 0;
       /* Sort uncolorable allocno to find the one with the lowest spill
 	 cost.  */
       for (i = 0, j = num - 1; i <= j;)
@@ -935,16 +936,21 @@ push_allocnos_to_stack (void)
 		     allocnos.  */
 		  ALLOCNO_TEMP (i_allocno) = cost;
 		}
+	      i_allocno_cost = ALLOCNO_TEMP (i_allocno);
 	      i_allocno_pri
-		= ((double) ALLOCNO_TEMP (i_allocno)
+		= (i_allocno_cost
 		   / (ALLOCNO_LEFT_CONFLICTS_NUM (i_allocno)
 		      * reg_class_nregs [ALLOCNO_COVER_CLASS (i_allocno)]
 		                        [ALLOCNO_MODE (i_allocno)] + 1));
 	      if (allocno == NULL || allocno_pri > i_allocno_pri
 		  || (allocno_pri == i_allocno_pri
-		      && (ALLOCNO_NUM (allocno) > ALLOCNO_NUM (i_allocno))))
+		      && (allocno_cost > i_allocno_cost
+			  || (allocno_cost == i_allocno_cost 
+			      && (ALLOCNO_NUM (allocno)
+				  > ALLOCNO_NUM (i_allocno))))))
 		{
 		  allocno = i_allocno;
+		  allocno_cost = i_allocno_cost;
 		  allocno_pri = i_allocno_pri;
 		}
 	    }
Index: global.c
===================================================================
--- global.c	(revision 133761)
+++ global.c	(working copy)
@@ -222,7 +222,6 @@ static void prune_preferences (void);
 static void set_preferences (void);
 static void find_reg (int, HARD_REG_SET, int, int, int);
 static void dump_conflicts (FILE *);
-void build_insn_chain (void);
 
 
 /* Look through the list of eliminable registers.  Set ELIM_SET to the
Index: ira-emit.c
===================================================================
--- ira-emit.c	(revision 133761)
+++ ira-emit.c	(working copy)
@@ -263,17 +263,21 @@ set_allocno_reg (allocno_t allocno, rtx 
        a = ALLOCNO_NEXT_REGNO_ALLOCNO (a))
     if (subloop_tree_node_p (ALLOCNO_LOOP_TREE_NODE (a), node))
       ALLOCNO_REG (a) = reg;
+  for (a = ALLOCNO_CAP (allocno); a != NULL; a = ALLOCNO_CAP (a))
+    ALLOCNO_REG (a) = reg;
   regno = ALLOCNO_REGNO (allocno);
   for (a = allocno;;)
     {
-      if ((a = ALLOCNO_CAP (a)) == NULL)
+      if (a == NULL || (a = ALLOCNO_CAP (a)) == NULL)
 	{
 	  node = node->father;
 	  if (node == NULL)
 	    break;
 	  a = node->regno_allocno_map [regno];
 	}
-      if (a == NULL || ALLOCNO_CHILD_RENAMED_P (a))
+      if (a == NULL)
+	continue;
+      if (ALLOCNO_CHILD_RENAMED_P (a))
 	break;
       ALLOCNO_CHILD_RENAMED_P (a) = TRUE;
     }
Index: alias.c
===================================================================
--- alias.c	(revision 133761)
+++ alias.c	(working copy)
@@ -1972,7 +1972,7 @@ adjust_offset_for_component_ref (tree x,
   return GEN_INT (ioffset);
 }
 
-/* The function returns nonzero if X is a stack address.  */
+/* The function returns nonzero if X is an address containg VALUE.  */
 static int
 value_addr_p (rtx x)
 {
Index: emit-rtl.c
===================================================================
--- emit-rtl.c	(revision 133761)
+++ emit-rtl.c	(working copy)
@@ -1186,9 +1186,8 @@ gen_lowpart_common (enum machine_mode mo
 	return gen_rtx_fmt_e (GET_CODE (x), mode, XEXP (x, 0));
     }
   else if (GET_CODE (x) == SUBREG || REG_P (x)
-	   || GET_CODE (x) == CONCAT || GET_CODE (x) == CONCATN
-	   || GET_CODE (x) == CONST_VECTOR || GET_CODE (x) == CONST_DOUBLE
-	   || GET_CODE (x) == CONST_INT)
+	   || GET_CODE (x) == CONCAT || GET_CODE (x) == CONST_VECTOR
+	   || GET_CODE (x) == CONST_DOUBLE || GET_CODE (x) == CONST_INT)
     return simplify_gen_subreg (mode, x, innermode, offset);
 
   /* Otherwise, we can't do this.  */
Index: simplify-rtx.c
===================================================================
--- simplify-rtx.c	(revision 133761)
+++ simplify-rtx.c	(working copy)
@@ -5127,7 +5127,7 @@ simplify_subreg (enum machine_mode outer
 
   /* Handle complex values represented as CONCAT
      of real and imaginary part.  */
-  if (GET_CODE (op) == CONCAT || GET_CODE (op) == CONCATN)
+  if (GET_CODE (op) == CONCAT)
     {
       unsigned int part_size, final_offset;
       rtx part, res;
Index: common.opt
===================================================================
--- common.opt	(revision 133761)
+++ common.opt	(working copy)
@@ -708,10 +708,6 @@ floop-optimize
 Common
 Does nothing.  Preserved for backward compatibility.
 
-flower-subreg
-Common Report Var(flag_lower_subreg)
-Subreg lowering
-
 fmath-errno
 Common Report Var(flag_errno_math) Init(1)
 Set errno after built-in math functions
Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c	(revision 133761)
+++ config/rs6000/rs6000.c	(working copy)
@@ -20003,12 +20003,12 @@ rs6000_elf_in_small_data_p (const_tree d
   if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl))
     {
       const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
-      if (compare_section_name (section, ".sdata") == 0
-	  || compare_section_name (section, ".sdata2") == 0
-	  || compare_section_name (section, ".gnu.linkonce.s") == 0
-	  || compare_section_name (section, ".sbss") == 0
-	  || compare_section_name (section, ".sbss2") == 0
-	  || compare_section_name (section, ".gnu.linkonce.sb") == 0
+      if (compare_section_name (section, ".sdata")
+	  || compare_section_name (section, ".sdata2")
+	  || compare_section_name (section, ".gnu.linkonce.s")
+	  || compare_section_name (section, ".sbss")
+	  || compare_section_name (section, ".sbss2")
+	  || compare_section_name (section, ".gnu.linkonce.sb")
 	  || strcmp (section, ".PPC.EMB.sdata0") == 0
 	  || strcmp (section, ".PPC.EMB.sbss0") == 0)
 	return true;

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