[PATCH] Fix cselib ICEs with ebb scheduling (PR bootstrap/43596)

Jakub Jelinek jakub@redhat.com
Wed Mar 31 15:08:00 GMT 2010


Hi!

ia64 doesn't bootstrap ATM, because cselib_process_insn forgets
to reset cselib_current_insn on labels, setjmp calls or volatile asms
(the last one is what broke boehm-gc build) and the new assertion
in cselib_lookup_from_insn which expects not to be called from within
cselib_process_insn fails.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
bootstrap still pending on ia64-linux, ok for trunk?

2010-03-31  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/43596
	* cselib.c (cselib_process_insn): Clear cselib_current_insn
	even before returning from label, setjmp call or volatile asm
	handling.

--- gcc/cselib.c.jj	2010-03-31 13:12:00.000000000 +0200
+++ gcc/cselib.c	2010-03-31 15:02:29.000000000 +0200
@@ -2155,12 +2155,13 @@ cselib_process_insn (rtx insn)
 	  && MEM_VOLATILE_P (PATTERN (insn))))
     {
       cselib_reset_table (next_uid);
+      cselib_current_insn = NULL_RTX;
       return;
     }
 
   if (! INSN_P (insn))
     {
-      cselib_current_insn = 0;
+      cselib_current_insn = NULL_RTX;
       return;
     }
 
@@ -2202,7 +2203,7 @@ cselib_process_insn (rtx insn)
       if (GET_CODE (XEXP (x, 0)) == CLOBBER)
 	cselib_invalidate_rtx (XEXP (XEXP (x, 0), 0));
 
-  cselib_current_insn = 0;
+  cselib_current_insn = NULL_RTX;
 
   if (n_useless_values > MAX_USELESS_VALUES
       /* remove_useless_values is linear in the hash table size.  Avoid

	Jakub



More information about the Gcc-patches mailing list