diff options
author | Andrew Haley <aph@redhat.com> | 2002-12-10 16:35:37 +0000 |
---|---|---|
committer | Andrew Haley <aph@redhat.com> | 2002-12-10 16:35:37 +0000 |
commit | 19a894a8d54f77e48332daff1fa96f4f0da1682c (patch) | |
tree | d3256387303f49f996553760d5175845fdb61ac3 | |
parent | b179236322b3763713b837cde38430963a8e9e7b (diff) |
2002-12-10 Andrew Haley <aph@redhat.com>
* cse.c (cse_insn): Don't cse past a basic block boundary.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@60000 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cse.c | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91f44af8ec1..d3ed606e61d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-12-10 Andrew Haley <aph@redhat.com> + + * cse.c (cse_insn): Don't cse past a basic block boundary. + 2002-12-10 Jakub Jelinek <jakub@redhat.com> * config/linux.h (LIB_SPEC): If -pthread, add -lpthread even if diff --git a/gcc/cse.c b/gcc/cse.c index 9688204c466..1d606b60c13 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -6316,8 +6316,16 @@ cse_insn (insn, libcall_insn) if ((src_ent->first_reg == REGNO (SET_DEST (sets[0].rtl))) && ! find_reg_note (insn, REG_RETVAL, NULL_RTX)) { - rtx prev = prev_nonnote_insn (insn); - + rtx prev = insn; + /* Scan for the previous nonnote insn, but stop at a basic + block boundary. */ + do + { + prev = PREV_INSN (prev); + } + while (prev && GET_CODE (prev) == NOTE + && NOTE_LINE_NUMBER (prev) != NOTE_INSN_BASIC_BLOCK); + /* Do not swap the registers around if the previous instruction attaches a REG_EQUIV note to REG1. |