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]

Revert my last move2add patch. (Was Re: GCC build failed fornative with your patch on2003-04-17T21:46:51Z.)


Hi David,

> cc1: internal compiler error: Segmentation fault
> when the stage2 compiler tries to compile libgcc2.

Err, I really need to sit down and think.

> 	I am going to try with your patch, but if you are guessing wildly,
> I would like to ask that your patch be reverted.

Yes, I think that's most reasonable at this point.  I am so sorry for
the trouble.  Committed as obvious.

Kazu Hirata

2003-04-18  Kazu Hirata  <kazu at cs dot umass dot edu>

	* reload1.c: Revert my previous patch on 2002-04-17.

Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.389
diff -u -r1.389 reload1.c
--- reload1.c	17 Apr 2003 21:42:19 -0000	1.389
+++ reload1.c	18 Apr 2003 20:23:24 -0000
@@ -9094,9 +9094,6 @@
        && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (OUTMODE), \
 				 GET_MODE_BITSIZE (INMODE))))
 
-/* The source of the last set to cc0 we've seen.  */
-static rtx move2add_last_cc0;
-
 static void
 reload_cse_move2add (first)
      rtx first;
@@ -9109,7 +9106,6 @@
 
   move2add_last_label_luid = 0;
   move2add_luid = 2;
-  move2add_last_cc0 = NULL_RTX;
   for (insn = first; insn; insn = NEXT_INSN (insn), move2add_luid++)
     {
       rtx pat, note;
@@ -9292,29 +9288,6 @@
 	    }
 	}
       note_stores (PATTERN (insn), move2add_note_store, NULL);
-
-      /* If INSN is a conditional branch, we try to extract an
-	 implicit set out of it.  */
-      if (any_condjump_p (insn) && onlyjump_p (insn))
-	{
-	  rtx cnd = get_condition (insn, NULL);
-
-#ifdef HAVE_cc0
-	  if (cnd != NULL_RTX && move2add_last_cc0 != NULL_RTX)
-	    cnd = simplify_replace_rtx (cnd, cc0_rtx, move2add_last_cc0);
-#endif
-	  if (cnd != NULL_RTX
-	      && GET_CODE (cnd) == NE
-	      && GET_CODE (XEXP (cnd, 0)) == REG
-	      && SCALAR_INT_MODE_P (GET_MODE (XEXP (cnd, 0)))
-	      && GET_CODE (XEXP (cnd, 1)) == CONST_INT)
-	    {
-	      rtx implicit_set =
-		gen_rtx_SET (VOIDmode, SET_DEST (cnd), SET_SRC (cnd));
-	      move2add_note_store (SET_DEST (implicit_set), implicit_set, 0);
-	    }
-	}
-
       /* If this is a CALL_INSN, all call used registers are stored with
 	 unknown values.  */
       if (GET_CODE (insn) == CALL_INSN)
@@ -9359,13 +9332,6 @@
       if (GET_CODE (dst) == PRE_INC || GET_CODE (dst) == POST_INC
 	  || GET_CODE (dst) == PRE_DEC || GET_CODE (dst) == POST_DEC)
 	reg_set_luid[REGNO (XEXP (dst, 0))] = 0;
-      return;
-    }
-  /* Note a store into cc0 so that we can later find an implicit
-     set.  */
-  if (CC0_P (dst))
-    {
-      move2add_last_cc0 = SET_SRC (set);
       return;
     }
   if (GET_CODE (dst) != REG)


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