diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-09-06 08:44:50 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-09-06 02:44:50 -0600 |
commit | 8d71a51026ad5ce87d51be1915a2eb2ae88f9cd8 (patch) | |
tree | dfd9f56ed37e8448c9b5512002fa1ef6c3187c0f /gcc | |
parent | 4b7ddb7a02dba3beb5c0e7d048a312fe7f821744 (diff) | |
download | gcc-8d71a51026ad5ce87d51be1915a2eb2ae88f9cd8.zip gcc-8d71a51026ad5ce87d51be1915a2eb2ae88f9cd8.tar.gz gcc-8d71a51026ad5ce87d51be1915a2eb2ae88f9cd8.tar.bz2 |
cse.c (delete_trivially_dead_insns): Do not skip the last insn if it is a real insn.
* cse.c (delete_trivially_dead_insns): Do not skip the last
insn if it is a real insn.
From-SVN: r29138
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cse.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 430e62b..5e40c62 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 6 02:42:36 1999 Jeffrey A Law (law@cygnus.com) + + * cse.c (delete_trivially_dead_insns): Do not skip the last + insn if it is a real insn. + Sun Sep 5 18:57:42 1999 Mark Mitchell <mark@codesourcery.com> * Makefile.in (ggc-simple.o): Depend on hash.h. @@ -9135,8 +9135,16 @@ delete_trivially_dead_insns (insns, nreg) /* Go from the last insn to the first and delete insns that only set unused registers or copy a register to itself. As we delete an insn, remove - usage counts for registers it uses. */ - for (insn = prev_real_insn (get_last_insn ()); insn; insn = prev) + usage counts for registers it uses. + + The first jump optimization pass may leave a real insn as the last + insn in the function. We must not skip that insn or we may end + up deleting code that is not really dead. */ + insn = get_last_insn (); + if (GET_RTX_CLASS (GET_CODE (insn)) != 'i') + insn = prev_real_insn (insn); + + for ( ; insn; insn = prev) { int live_insn = 0; rtx note; |