diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-30 20:20:28 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-30 20:20:28 +0000 |
commit | c82ce26ca18c92031db51895eda31e005ef1ae80 (patch) | |
tree | d6477ccdc3c648dfc1d17513d3af2b0fa2ff2bf7 /gcc/flow.c | |
parent | 742ee135dbc0a61fb3b12ef30dfeb049f809b475 (diff) | |
download | gcc-c82ce26ca18c92031db51895eda31e005ef1ae80.tar.gz |
* flow.c (propagate_one_insn): Revise yesterday's patch. Delete
a dead insn with a REG_RETVAL note when the entire libcall is not
dead and remove the associated REG_LIBCALL note at the same time.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gcc/flow.c b/gcc/flow.c index ed2b24f7180..78cd43990aa 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -1643,8 +1643,27 @@ propagate_one_insn (pbi, insn) if (libcall_is_dead) prev = propagate_block_delete_libcall ( insn, note); - else if (!note) - propagate_block_delete_insn (insn); + else + { + + if (note) + { + /* If INSN contains a RETVAL note and is dead, but the libcall + as a whole is not dead, then we want to remove INSN, but + not the whole libcall sequence. + + However, we need to also remove the dangling REG_LIBCALL + note so that we do not have mis-matched LIBCALL/RETVAL + notes. In theory we could find a new location for the + REG_RETVAL note, but it hardly seems worth the effort. */ + rtx libcall_note; + + libcall_note + = find_reg_note (XEXP (note, 0), REG_LIBCALL, NULL_RTX); + remove_note (XEXP (note, 0), libcall_note); + } + propagate_block_delete_insn (insn); + } return prev; } |