[PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)

Jakub Jelinek jakub@redhat.com
Thu Oct 18 13:18:00 GMT 2007


On Thu, Oct 18, 2007 at 02:39:44PM +0200, Steven Bosscher wrote:
> > dce.c treats them as if an insn is part of libcall sequence, it must not be
> > deleted.
> 
> If an insn is part of a libcall *and* the insn is necessary, I
> suppose?  Blindly marking all libcall insns as necessary would be
> quite dumb.

See prescan_insns_for_dce - whenever it sees an insn with REG_LIBCALL_ID
note, it marks all insns with REG_LIBCALL_ID notes before and after it
(why it does so when prescan_insns_for_dce walks all insns anyway
is beyond my understanding - simple mark_insn (insn, fast) would do
exactly the same and in mark_reg_dependencies there is no point in marking
what has been already marked), so from what I can see dce.c never deletes
any libcall insns except noop moves (those are deleted even when they are
marked as needed, see delete_unmarked_insns), no matter whether they are
or are not needed.

	Jakub



More information about the Gcc-patches mailing list