This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix in cse.c for CC0 machines committed, delete-insn -> delete_insn
- To: gcc-patches at gcc dot gnu dot org, jh at suse dot cz
- Subject: Fix in cse.c for CC0 machines committed, delete-insn -> delete_insn
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Sat, 29 Sep 2001 14:20:21 +0200
This patch breaks builds on CC0 machines:
Fri Sep 28 14:59:34 CEST 2001 Jan Hubicka <jh@suse.cz>
* gcse.c (replace_store_insn): Use delete_insn.
* loop.c (move_movables): Likewise; avoid delete_insn
from clobbering notes moved elsewhere.
(check_dbra_loop): Use delete_insn.
* ssa.c (convert_from_ssa): Likewise.
* cse.c (cse_insn): Use delete_insn.
I'm most grateful for your massive and good work on gcc, but
this patch was obviously not tested on a CC0 machine. Whenever
you make a change inside a #ifdef HAVE_cc0, could you please
test on a CC0 machine. You don't have to find some old m68k
machine, you can (usually) use mn10300-elf+mn10300-sim as per
<URL:http://gcc.gnu.org/simtest-howto.html>.
Committed as obvious, since mn10300-elf does not build without
this patch (other CC0 machines too, such as CRIS), but with this
patch mn10300 builds up to and including cc1 -- then later
current mn10300 gas segfaults assembling libgcc2 muldi3. :-/
(FWIW, testresults for cris-axis-linux-gnu through a simulator
seem fine this far.) Using diff -cp8 so the HAVE_cc0 is obvious.
* cse.c (cse_insn) [HAVE_cc0]: Fix typo delete-insn -> delete_insn.
Index: cse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cse.c,v
retrieving revision 1.205
diff -p -c -c -p -8 -r1.205 cse.c
*** cse.c 2001/09/28 13:01:40 1.205
--- cse.c 2001/09/29 11:21:28
*************** cse_insn (insn, libcall_insn)
*** 6301,6317 ****
#ifdef HAVE_cc0
/* If the previous insn set CC0 and this insn no longer references CC0,
delete the previous insn. Here we use the fact that nothing expects CC0
to be valid over an insn, which is true until the final pass. */
if (prev_insn && GET_CODE (prev_insn) == INSN
&& (tem = single_set (prev_insn)) != 0
&& SET_DEST (tem) == cc0_rtx
&& ! reg_mentioned_p (cc0_rtx, x))
! delete-insn (prev_insn);
prev_insn_cc0 = this_insn_cc0;
prev_insn_cc0_mode = this_insn_cc0_mode;
#endif
prev_insn = insn;
}
--- 6301,6317 ----
#ifdef HAVE_cc0
/* If the previous insn set CC0 and this insn no longer references CC0,
delete the previous insn. Here we use the fact that nothing expects CC0
to be valid over an insn, which is true until the final pass. */
if (prev_insn && GET_CODE (prev_insn) == INSN
&& (tem = single_set (prev_insn)) != 0
&& SET_DEST (tem) == cc0_rtx
&& ! reg_mentioned_p (cc0_rtx, x))
! delete_insn (prev_insn);
prev_insn_cc0 = this_insn_cc0;
prev_insn_cc0_mode = this_insn_cc0_mode;
#endif
prev_insn = insn;
}
brgds, H-P