diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-10 16:35:37 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-10 16:35:37 +0000 |
commit | bb9099b3d65759c9fb58560c28b4020e2df71595 (patch) | |
tree | d3256387303f49f996553760d5175845fdb61ac3 /gcc | |
parent | b0f5e946991bc8e94911026ba6cec84695ab6278 (diff) | |
download | gcc-bb9099b3d65759c9fb58560c28b4020e2df71595.tar.gz |
2002-12-10 Andrew Haley <aph@redhat.com>
* cse.c (cse_insn): Don't cse past a basic block boundary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60000 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-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. |