This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]