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]

Lose dead code in bfin.c


A lot of Blackfin patches got queued up until stage 1 since I didn't
want to justify with every commit why I was checking in non-regression
fixes.

This one just deletes some ancient dead code which was probably copied
over from some other port and never meaningful on the Blackfin.
Committed as 118854.


Bernd
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 118853)
+++ ChangeLog	(working copy)
@@ -2,6 +2,9 @@
 
 	* tree-ssa-loop-ivopts.c (determine_iv_costs): Fix formatting.
 
+	* config/bfin/bfin.c (legitimize_pic_address): Lose dead code
+	that tests for CONSTANT_POOL_ADDRESS_P.
+
 2006-11-15  Jakub Jelinek  <jakub@redhat.com>
 
 	PR tree-optimization/29581
Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c	(revision 118809)
+++ config/bfin/bfin.c	(working copy)
@@ -145,36 +145,27 @@ legitimize_pic_address (rtx orig, rtx re
 
   if (GET_CODE (addr) == SYMBOL_REF || GET_CODE (addr) == LABEL_REF)
     {
-      if (GET_CODE (addr) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (addr))
-	reg = new = orig;
-      else
-	{
-	  int unspec;
-	  rtx tmp;
+      int unspec;
+      rtx tmp;
 
-	  if (TARGET_ID_SHARED_LIBRARY)
-	    unspec = UNSPEC_MOVE_PIC;
-	  else if (GET_CODE (addr) == SYMBOL_REF
-		   && SYMBOL_REF_FUNCTION_P (addr))
-	    {
-	      unspec = UNSPEC_FUNCDESC_GOT17M4;
-	    }
-	  else
-	    {
-	      unspec = UNSPEC_MOVE_FDPIC;
-	    }
+      if (TARGET_ID_SHARED_LIBRARY)
+	unspec = UNSPEC_MOVE_PIC;
+      else if (GET_CODE (addr) == SYMBOL_REF
+	       && SYMBOL_REF_FUNCTION_P (addr))
+	unspec = UNSPEC_FUNCDESC_GOT17M4;
+      else
+	unspec = UNSPEC_MOVE_FDPIC;
 
-	  if (reg == 0)
-	    {
-	      gcc_assert (!no_new_pseudos);
-	      reg = gen_reg_rtx (Pmode);
-	    }
+      if (reg == 0)
+	{
+	  gcc_assert (!no_new_pseudos);
+	  reg = gen_reg_rtx (Pmode);
+	}
 
-	  tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), unspec);
-	  new = gen_const_mem (Pmode, gen_rtx_PLUS (Pmode, picreg, tmp));
+      tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), unspec);
+      new = gen_const_mem (Pmode, gen_rtx_PLUS (Pmode, picreg, tmp));
 
-	  emit_move_insn (reg, new);
-	}
+      emit_move_insn (reg, new);
       if (picreg == pic_offset_table_rtx)
 	current_function_uses_pic_offset_table = 1;
       return reg;

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