diff options
author | Andrew Haley <aph@redhat.com> | 2002-12-10 16:35:37 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2002-12-10 16:35:37 +0000 |
commit | 3e25353ee782062cd488c4dc0382096e2276c17a (patch) | |
tree | d3256387303f49f996553760d5175845fdb61ac3 /gcc/cse.c | |
parent | 4fe1edca4d160e9161fe232dbfe74dd65b80edfe (diff) | |
download | gcc-3e25353ee782062cd488c4dc0382096e2276c17a.zip gcc-3e25353ee782062cd488c4dc0382096e2276c17a.tar.gz gcc-3e25353ee782062cd488c4dc0382096e2276c17a.tar.bz2 |
cse.c (cse_insn): Don't cse past a basic block boundary.
2002-12-10 Andrew Haley <aph@redhat.com>
* cse.c (cse_insn): Don't cse past a basic block boundary.
From-SVN: r60000
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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. |